diff options
Diffstat (limited to 'env.sh')
-rwxr-xr-x | env.sh | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -17,6 +17,20 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. +check_root () { + echo "Checking for root permissions" + if [ `whoami` != root ]; then + echo $0 ": Need to run as root. Stopping." + exit + fi + echo "[OK]" +} + +# Installation function +installenv () { + check_root + exit +} # Help message usage () { @@ -29,9 +43,6 @@ usage () { #Check for arguments case $1 in - help) - usage - ;; install) installenv ;; @@ -40,4 +51,4 @@ case $1 in ;; esac -usage() +usage |