aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristos.K <freedomrfox@gmail.com>2017-08-14 13:16:27 +0300
committerChristos.K <freedomrfox@gmail.com>2017-08-14 13:16:27 +0300
commite260deb32ea88b090f96fd28b0866e161c877e48 (patch)
treef6d73bab13c848f879d2dcd3ca2c14472e264d81 /bin
parentIncluded condition for first digit (diff)
downloadGSE-e260deb32ea88b090f96fd28b0866e161c877e48.tar.gz
GSE-e260deb32ea88b090f96fd28b0866e161c877e48.tar.bz2
GSE-e260deb32ea88b090f96fd28b0866e161c877e48.zip
Update gse with conditions for _ct_conf
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gse24
1 files changed, 23 insertions, 1 deletions
diff --git a/bin/gse b/bin/gse
index 2cfa724..dcf2ef0 100755
--- a/bin/gse
+++ b/bin/gse
@@ -142,7 +142,29 @@ while true; do
done
}
-if echo "$@" | grep -q '\--build-controller'; then
+if echo "$@" | grep -q '\--conf'; then
+ if [[ "$#" != 1 ]]; then
+ die "--conf argument has been detected"
+ fi
+
+ if [[ "$1" != *'='* || "${1#*=}" == '' ]]; then
+ die "No target file was given"
+ fi
+
+ if [[ ! -e "${1#*=}" ]]; then
+ die "No such file or directory"
+ fi
+
+ if [[ -d "${1#*=}" ]]; then
+ die "Target is a directory, aborting"
+ fi
+
+ if _ct_conf; then
+ _make_cimage
+ else
+ die "Exporting arguments from the configuration file has failed"
+ fi
+elif echo "$@" | grep -q '\--build-controller'; then
if _controller_args "${@:2}"; then
_make_cimage "${@:2}"
else