summaryrefslogtreecommitdiff
path: root/lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-27 12:20:24 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-06-28 18:23:25 +0200
commit6d7bf96c89bdcd9fe5bb30504e4817345f44ffac (patch)
tree6fefa81782a1e2f0c86ab5d5881301e071e63fff /lbu.in
parent1a2f956fc1d08d16e6e7e220056bd1fa39a8c2df (diff)
downloadalpine-conf-6d7bf96c89bdcd9fe5bb30504e4817345f44ffac.zip
lbu: add test for lbu list usage
Diffstat (limited to 'lbu.in')
-rw-r--r--lbu.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/lbu.in b/lbu.in
index bff12a2..224f06b 100644
--- a/lbu.in
+++ b/lbu.in
@@ -380,11 +380,14 @@ usage_list() {
usage: $PROGRAM list|ls
__EOF__
- exit 1
+ exit $1
}
cmd_list() {
cmd_migrate_include_exclude
+ if [ "$1" = "-h" ]; then
+ usage_list 0
+ fi
_gen_filelist
}
@@ -776,6 +779,9 @@ while getopts "adehlM:np:qrv" opt ; do
;;
v) VERBOSE="$VERBOSE -v"
;;
+ '?')
+ usage_$SUBCMD "1" >&2
+ ;;
esac
done
shift $(expr $OPTIND - 1)