summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorSam Tygier <samtygier@yahoo.co.uk>2018-12-18 21:06:18 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2018-12-21 04:09:47 +0000
commit7fbfdda31e5771b849876d306c25ede237bc577b (patch)
tree2d6d698e0e8390fc35679d51a7b556608030f1c5 /build.sh
parentcc6605695d75450d4dffd7bcc1563c3263b614b0 (diff)
Add commandline argument for config file
A config file can be specified when running build, e.g.: ./build.sh myconfig
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 0f36071..955a6e4 100755
--- a/build.sh
+++ b/build.sh
@@ -127,6 +127,16 @@ if [ -f config ]; then
source config
fi
+while getopts "c:" flag
+do
+ case "$flag" in
+ c)
+ EXTRA_CONFIG="$OPTARG"
+ source "$EXTRA_CONFIG"
+ ;;
+ esac
+done
+
if [ -z "${IMG_NAME}" ]; then
echo "IMG_NAME not set" 1>&2
exit 1