- Commit
- dea2d073377d77c94c260acb7e3f0805b5bfdce2
- Parent
- a2dcae534b7f9b9b44b6f2a9ebd20c739126a610
- Author
- Pablo Emilio Escobar Gaviria <pablo-escobar@riseup.net>
- Date
Patched the install-script
View the individual entries of an ICO file in sxiv ⏺️
Patched the install-script
1 file changed, 6 insertions, 6 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | install.sh | 12 | 6 | 6 |
diff --git a/install.sh b/install.sh @@ -11,14 +11,9 @@ # Copyright (C) 2020 Pablo Emilio Escobar Gaviria. # Free use of this software is granted under the terms of the GPL-3.0 License. -puts () -{ - printf "\033[1m\033[38;5;%sm[%s]\033[m %s\n\n" "$3" "$1" "$2" -} - error () { - puts ERROR "$1" 9 + printf "\033[1m\033[38;5;9m[ERROR]\033[m %s\n\n" "$1" exit 1 } @@ -27,6 +22,11 @@ dependencyError () error "$(printf "The command '%s' could not be found.\nPlease make sure it is included in the \$PATH enviroment variable or follow the installation instructions on %s." "$1" "$2")" } +if [ "$(id -u)" -ne "0" ] +then + error "This script requires administrator-privileges" +fi + if ! [ -x "$(command -v mktemp)" ] then dependencyError "mktemp" "https://www.gnu.org/software/coreutils/"