aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-08-23 19:14:44 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-08-23 19:14:44 +0300
commita4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a (patch)
treeedf1c0a4299a573b1df04c83e7809a0512e1393f
parentf56867064771d9a3560a2c2310d9703be34d594f (diff)
downloadarching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.tar.gz
arching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.tar.bz2
arching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.zip
Dynamic sudo usage
-rwxr-xr-xinstall.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index b434cef..6255de0 100755
--- a/install.sh
+++ b/install.sh
@@ -58,6 +58,16 @@ checkPkgManager(){
}
checkPkgManager
+sudoBin="sudo"
+checkIfSudoAvailable(){
+ which sudo
+ if [ $? -ne 0 ]
+ then
+ sudoBin=""
+ fi
+}
+checkIfSudoAvailable
+
# Depedencies check and install
declare -a depedencies=("curl" "wget" "bash" "jq" "nodejs" "npm" "gpg" "git")
for dep in "${depedencies[@]}"