Permalink
Browse files

don't let the install script run as root user

  • Loading branch information...
1 parent 5066db9 commit 9723c4abc9d554b64fe22b1541148ddc554f0e2c @Raven24 Raven24 committed Nov 16, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 script/install.sh
View
8 script/install.sh
@@ -180,6 +180,13 @@ interactive_check() {
fi
}
+# check if this script is run as root
+root_check() {
+ if [ `id -u` -eq 0 ] ; then
+ error "don't run this script as root!"
+ fi
+}
+
# check if all necessary binaries are available
binaries_check() {
for exe in "${!BINARIES[@]}"; do
@@ -447,6 +454,7 @@ prepare_gem_bundle() {
#### ####
#interactive_check
+root_check
# display a nice welcome message

0 comments on commit 9723c4a

Please sign in to comment.