don't let the install script run as root user

This commit is contained in:
Florian Staudacher 2012-11-16 15:34:44 +01:00
parent 5066db9941
commit 9723c4abc9

View file

@ -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