Merge pull request #696 from Botspot/patch-1

print error and exit if install script is run as root
pull/757/head
Botspot 4 years ago committed by GitHub
commit 686e4e7d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,6 +7,10 @@ function error {
cd $HOME
if [[ "$(id -u)" == 0 ]]; then
error "Pi-Apps is not designed to be installed as root! Please try again as a regular user."
fi
DIRECTORY="$(readlink -f "$(dirname "$0")")"
#install yad automatically

@ -355,5 +355,5 @@ elif [ "$1" == 'update-all' ];then
IFS="$PREIFS"
echo -e '\e[92mOperation completed successfully!\e[39m'
else
error "Did not understand $1. Allowed values: 'install', 'install-if-not-installed', 'multi-install', 'multi-uninstall', 'update', 'check-all', or 'update-all'."
error "Did not understand $1. Allowed values: 'install', 'multi-install', 'install-if-not-installed', 'uninstall', 'multi-uninstall', 'update','update-all', or 'check-all'."
fi

Loading…
Cancel
Save