Add guard for root bash install

This commit is contained in:
Rico Tiongson committed 2020-05-12 09:36:13 +08:00
1 parent 7728495350
commit 36d07b1e5d
1 file changed
+5
+5
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:]')"