summaryrefslogtreecommitdiff
path: root/setup-apkcache.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-13 11:48:19 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-13 15:52:55 +0200
commitefa5103fea2dbdae98dbfe230d7d450e0703e322 (patch)
treed9f979933978f624204a74e0e1f7855db20e5de9 /setup-apkcache.in
parent4a0936126de486fc1899466efff8403504aa0a17 (diff)
downloadalpine-conf-efa5103fea2dbdae98dbfe230d7d450e0703e322.zip
setup-apkcache: do no prompt when DIR is specified
When DIR is specified we run in non-interactive mode and should not block.
Diffstat (limited to 'setup-apkcache.in')
-rw-r--r--setup-apkcache.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup-apkcache.in b/setup-apkcache.in
index 5e40c21..2c03c7a 100644
--- a/setup-apkcache.in
+++ b/setup-apkcache.in
@@ -142,9 +142,9 @@ fi
if [ -z "$suggestion" ]; then
suggestion=none
fi
-cachedir=$1
+cachedir="$1"
-while [ -z "$cachedir" ]; do
+while [ $# -eq 0 ] && [ -z "$cachedir" ]; do
ask "Enter apk cache directory (or '?' or 'none')" "$suggestion"
cachedir="$resp"
if [ "$cachedir" = "?" ]; then