Add guard for root bash install

This commit is contained in:
Rico Tiongson 2020-05-12 09:36:13 +08:00
parent 7728495350
commit 36d07b1e5d

View File

@ -2,6 +2,11 @@
set -e
if [[ "$USER" == root ]]; then
echo "Please run 'bash install' as non-root user" 2>&1
exit 1
fi
DIR="$(dirname "$0")"
VERSION="$(cat $DIR/VERSION | tr -d '[:space:]')"