Permalink
Browse files

Perform sudo check after explaining what the script does.

  • Loading branch information...
1 parent a0f6651 commit e5ec94de8ee8955cbfa0ea76f9becb5677449585 @joshfng joshfng committed Jan 26, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 railsready.sh
View
@@ -51,9 +51,6 @@ if [ $script_runner == "root" ] ; then
exit 1
fi
-# Check if the user has sudo privileges.
-sudo -v >/dev/null 2>&1 || { echo $script_runner has no sudo privileges ; exit 1; }
-
echo -e "\n\n"
echo "!!! This script will update your system! Run on a fresh install only !!!"
echo "run tail -f $log_file in a new terminal to watch the install"
@@ -70,6 +67,9 @@ echo " * Git"
echo -e "\nThis script is always changing."
echo "Make sure you got it from https://github.com/joshfng/railsready"
+# Check if the user has sudo privileges.
+sudo -v >/dev/null 2>&1 || { echo $script_runner has no sudo privileges ; exit 1; }
+
# Ask if you want to build Ruby or install RVM
echo -e "\n"
echo "Build Ruby or install RVM?"

0 comments on commit e5ec94d

Please sign in to comment.