summaryrefslogtreecommitdiff
path: root/setup-apkrepos.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-13 15:34:26 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-13 15:52:55 +0200
commit3e2673053162101e14c773c9f4d125a32d123bd2 (patch)
tree4d23ecf01b5d6a1ba61557f7c7d46a8940e24270 /setup-apkrepos.in
parent0427f00b7e8af1d79c6d1922ea0d04c01ee6614e (diff)
downloadalpine-conf-3e2673053162101e14c773c9f4d125a32d123bd2.zip
setup-apkrepos: create dir if missing and add mock
This allows us test it
Diffstat (limited to 'setup-apkrepos.in')
-rw-r--r--setup-apkrepos.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 732463f..736cc63 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -184,6 +184,7 @@ changed=false
if [ $# -gt 0 ]; then
# replace the apk repos with the specified ones
rm -f "$APKREPOS_PATH"
+ mkdir -p "${APKREPOS_PATH%/*}"
for i; do
echo "$i" >> "$APKREPOS_PATH" && changed=true
done
@@ -225,6 +226,6 @@ done
if $changed; then
echo -n "Updating repository indexes... "
- apk update --quiet $apk_root_opt && echo "done."
+ $MOCK apk update --quiet $apk_root_opt && echo "done."
fi