diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-13 15:52:16 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-13 15:52:55 +0200 |
commit | a494ec50ab6eabb8d70557284edbf135aa61d72f (patch) | |
tree | 48c9aef4b907b80f43aab60ea688b72509894f80 /setup-alpine.in | |
parent | ed97fbc0e74b04f0431b6fb4c61c1980ffbaaeda (diff) | |
download | alpine-conf-a494ec50ab6eabb8d70557284edbf135aa61d72f.zip |
setup-alpine: fix -h usage text
Diffstat (limited to 'setup-alpine.in')
-rw-r--r-- | setup-alpine.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/setup-alpine.in b/setup-alpine.in index 9c853d4..96c1787 100644 --- a/setup-alpine.in +++ b/setup-alpine.in @@ -4,7 +4,8 @@ PROGRAM=setup-alpine VERSION=@VERSION@ PREFIX=@PREFIX@ -. $PREFIX/lib/libalpine.sh +: ${LIBDIR=$PREFIX/lib} +. "$LIBDIR/libalpine.sh" is_qemu() { grep -q "QEMU" /proc/cpuinfo \ @@ -25,7 +26,7 @@ usage() { -h Show this help -q Quick mode. Ask fewer questions. __EOF__ - exit 1 + exit $1 } while getopts "aef:c:hq" opt ; do @@ -34,9 +35,9 @@ while getopts "aef:c:hq" opt ; do f) USEANSWERFILE="$OPTARG";; c) CREATEANSWERFILE="$OPTARG";; e) empty_root_password=1;; - h) usage;; + h) usage 0;; q) empty_root_password=1; quick=1; APKREPOSOPTS="-1"; HOSTNAMEOPTS="alpine";; - *) usage;; + '?') usage "1" >&2;; esac done shift $(expr $OPTIND - 1) |