From 331f4be653afed854b9255a0783d5d563285e500 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Thu, 10 May 2018 08:35:50 -0700 Subject: [PATCH] Begin moving arg parsing to install.sh I chose to make the arg parsing in install.sh a function because it simplifies handling positional arguments in the interim without messing with arrays. Just serves to get our foot in the door for arg processing for now. --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 970c013..46f7140 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,8 @@ a2cloudVersion="2.9.0" # Leave this quoted! +noPicoPkg= + # Find the path of our source directory a2cSource="$( dirname "${BASH_SOURCE[0]}" )" pushd $a2cSource >/dev/null @@ -20,6 +22,20 @@ if [[ ! -f "$a2cSource/.a2cloud_source" ]]; then exit 1 fi +process_args() { + while [[ $1 ]]; do + if [[ $1 == "-c" ]]; then + shift + noPicoPkg=1 + else + shift + fi + done +} + +process_args "$@" + +# FIXME: Show version, changes, config, allow reconfig, etc… "$a2cSource/scripts/show_changes" # Run the legacy setup script for anything not yet ported