aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-10-26 11:35:57 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-10-26 11:36:34 +0200
commit2474a9e50e5d21ed6b3fd825d9fe565b79f62014 (patch)
treea8faed6b79069c35a39983831f8f3089878545a2 /bin
parent22f0f794ac4e40866c5d390a7b27b8bd6713e681 (diff)
downloadapp.sh-2474a9e50e5d21ed6b3fd825d9fe565b79f62014.tar.gz
app.sh-2474a9e50e5d21ed6b3fd825d9fe565b79f62014.tar.bz2
app.sh-2474a9e50e5d21ed6b3fd825d9fe565b79f62014.tar.xz
app.sh-2474a9e50e5d21ed6b3fd825d9fe565b79f62014.zip
o Adding '-f [file]' option to app-conf set.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/app-conf15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/app-conf b/bin/app-conf
index cd127a2..96e52cf 100755
--- a/bin/app-conf
+++ b/bin/app-conf
@@ -151,9 +151,22 @@ case "$command" in
app-cat-conf -l "$location" | format_conf
;;
set)
+ while getopts "f:" opt
+ do
+ case $opt in
+ f)
+ file="$OPTARG"
+ shift 2;
+ ;;
+ *)
+ usage "Unknown argument: $OPTARG"
+ ;;
+ esac
+ done
+
if [ $# -ne 2 ]
then
- usage "Expected exactly two arguments"
+ usage "Expected exactly two arguments."
fi
conf_set "$file" "$1" "$2"