aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/app-conf8
-rwxr-xr-xbin/app-init3
2 files changed, 6 insertions, 5 deletions
diff --git a/bin/app-conf b/bin/app-conf
index 88498e9..cd127a2 100755
--- a/bin/app-conf
+++ b/bin/app-conf
@@ -28,7 +28,7 @@ format_conf() {
local IFS==
while read key value
do
- printf "%-20s %-20s" "$key" "$value"
+ printf "%-20s %s" "$key" "$value"
echo
done
}
@@ -140,12 +140,12 @@ case "$command" in
usage
fi
- app-cat-conf -l "$location" -n "$1" | cut -f 2 -d = | format_conf | sed "s, *$,,"
+ app-cat-conf -l "$location" -n "$1" | cut -f 2- -d =
;;
list)
if [ $# -gt 0 ]
then
- usage "Extra options."
+ usage "Extra arguments."
fi
app-cat-conf -l "$location" | format_conf
@@ -153,7 +153,7 @@ case "$command" in
set)
if [ $# -ne 2 ]
then
- usage
+ usage "Expected exactly two arguments"
fi
conf_set "$file" "$1" "$2"
diff --git a/bin/app-init b/bin/app-init
index 7098cb3..fb4f7cd 100755
--- a/bin/app-init
+++ b/bin/app-init
@@ -12,6 +12,7 @@ usage_text() {
echo "usage: $usage_app -d dir <resolver> <resolver args>"
}
+dir=
while getopts "d:" opt
do
case $opt in
@@ -32,7 +33,7 @@ resolver_name="$1"; shift
if [ -z "$dir" ]
then
- usage
+ usage "-d is required"
fi
if [ -e "$dir" ]