Permalink
Browse files

Make a function require_root

  • Loading branch information...
1 parent 6bc8e30 commit 7c618c9e8f28c9c25761f2dd683761f4b2de20db Ángel Guzmán Maeso committed Mar 7, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 deploy-dev.sh
View
@@ -57,10 +57,15 @@ install_GIT()
cd ..; rm -rf git-*
}
-if [ `/usr/bin/id -u` -ne 0 ]; then
- echo 'Please, run this script as root.'
- usage
-fi
+require_root()
+{
+ if [ `/usr/bin/id -u` -ne 0 ]; then
+ echo 'Please, run this script as root.'
+ usage
+ fi
+}
+
+require_root
echo 'Installing HyperVM development version.'

0 comments on commit 7c618c9

Please sign in to comment.