From 4a0936126de486fc1899466efff8403504aa0a17 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 13 May 2022 11:37:01 +0200 Subject: setup-apkcache: fix usage and -h option --- setup-apkcache.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup-apkcache.in b/setup-apkcache.in index fbe8541..5e40c21 100644 --- a/setup-apkcache.in +++ b/setup-apkcache.in @@ -1,8 +1,8 @@ #!/bin/sh PREFIX=@PREFIX@ - -. "$PREFIX/lib/libalpine.sh" +: ${LIBDIR=$PREFIX/lib} +. "$LIBDIR/libalpine.sh" usage() { cat <<-__EOF__ @@ -15,7 +15,7 @@ usage() { options: -h Show this help __EOF__ - exit 1 + exit $1 } is_mounted() { @@ -112,7 +112,8 @@ apk_cache_help() { while getopts "h" opt; do case $opt in - h) usage;; + h) usage 0;; + '?') usage "1" >&2;; esac done shift $(( $OPTIND - 1 )) -- cgit v1.2.3