diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-08-23 19:14:44 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-08-23 19:14:44 +0300 |
commit | a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a (patch) | |
tree | edf1c0a4299a573b1df04c83e7809a0512e1393f /install.sh | |
parent | f56867064771d9a3560a2c2310d9703be34d594f (diff) | |
download | arching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.tar.gz arching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.tar.bz2 arching-kaos-tools-a4b0e5d5cb75ff4af2054ed8df28bb10fe92e16a.zip |
Dynamic sudo usage
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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[@]}" |