Skip to content

Commit

Permalink
don't let the install script run as root user
Browse files Browse the repository at this point in the history
  • Loading branch information
Raven24 committed Nov 16, 2012
1 parent 5066db9 commit 9723c4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions script/install.sh
Expand Up @@ -180,6 +180,13 @@ interactive_check() {
fi 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 # check if all necessary binaries are available
binaries_check() { binaries_check() {
for exe in "${!BINARIES[@]}"; do for exe in "${!BINARIES[@]}"; do
Expand Down Expand Up @@ -447,6 +454,7 @@ prepare_gem_bundle() {
#### #### #### ####


#interactive_check #interactive_check
root_check




# display a nice welcome message # display a nice welcome message
Expand Down

0 comments on commit 9723c4a

Please sign in to comment.