summaryrefslogtreecommitdiff
path: root/lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-27 12:08:07 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-06-28 18:23:25 +0200
commit1a2f956fc1d08d16e6e7e220056bd1fa39a8c2df (patch)
tree1d404e7866f9b78bacbc076952d2c6e4c7c3e3e2 /lbu.in
parentd38b08640e8c063e76ae7c791579d2789473028e (diff)
downloadalpine-conf-1a2f956fc1d08d16e6e7e220056bd1fa39a8c2df.zip
lbu: add test for lbu diff usage
Diffstat (limited to 'lbu.in')
-rw-r--r--lbu.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbu.in b/lbu.in
index 9155892..bff12a2 100644
--- a/lbu.in
+++ b/lbu.in
@@ -673,13 +673,13 @@ usage_diff() {
usage: $PROGRAM diff [<media>]
__EOF__
- exit 1
+ exit $1
}
cmd_diff() {
local diff_opts=
LBU_MEDIA=${1:-"$LBU_MEDIA"}
- [ -z "$LBU_MEDIA" ] && [ -z "$LBU_BACKUPDIR" ] && usage_diff
+ [ -z "$LBU_MEDIA" ] && [ -z "$LBU_BACKUPDIR" ] && usage_diff "1" >&2
local tmp
init_tmpdir tmp
mkdir -p "$tmp/a" "$tmp/b"