From 2474a9e50e5d21ed6b3fd825d9fe565b79f62014 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 26 Oct 2013 11:35:57 +0200 Subject: o Adding '-f [file]' option to app-conf set. --- bin/app-conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bin') 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" -- cgit v1.2.3