move getopts back to main scope
authorJason Etheridge <jason@esilibrary.com>
Thu, 10 Oct 2013 22:49:11 +0000 (18:49 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 10 Oct 2013 22:49:11 +0000 (18:49 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
installer/wheezy/eg_wheezy_installer.sh

index 47971db..89f468a 100755 (executable)
 # GNU General Public License for more details.
 # -----------------------------------------------------------------------
 
+while getopts ayst option
+do
+        case "${option}"
+        in
+                a) AUTOSTART=1;;
+                y) YES=1;;
+                s) SAMPLEDATA=--load-all-sample;;
+                t) LIVETEST=1;;
+        esac
+done
+
 function my_init {
     date
     init_variables
@@ -43,16 +54,6 @@ function init_variables {
     # -----------------------------------------------------------------------
     # Handling passed arguments to the script
     # -----------------------------------------------------------------------
-    while getopts ayst option
-    do
-            case "${option}"
-            in
-                    a) AUTOSTART=1;;
-                    y) YES=1;;
-                    s) SAMPLEDATA=--load-all-sample;;
-                    t) LIVETEST=1;;
-            esac
-    done
     export DOJO_VERSION='1.3.3';
     export PATH=/openils/bin:$PATH
     export LD_LIBRARY_PATH=/openils/lib:/usr/local/lib:/usr/local/lib/dbd:$LD_LIBRARY_PATH