diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-24 12:08:23 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2023-01-24 12:07:31 +0000 |
commit | 04e4624ab54a2c26e03e9df960e1640ceb150ddc (patch) | |
tree | ea2832ca6958bcbacbfe627f9c90e526662919b1 /tests/bin/apk | |
parent | d0cb8a74038ae77a35fb52752d8977bae87a6614 (diff) | |
download | alpine-conf-04e4624ab54a2c26e03e9df960e1640ceb150ddc.zip |
setup-*: use fake apk instead of $MOCK apk
Diffstat (limited to 'tests/bin/apk')
-rwxr-xr-x | tests/bin/apk | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/bin/apk b/tests/bin/apk index df1711c..ceff306 100755 --- a/tests/bin/apk +++ b/tests/bin/apk @@ -9,10 +9,9 @@ fi rootfs=. kver=5.15.78-0 -audit_prefix="U " while [ $# -gt 0 ]; do case "$1" in - add|del) + add|del|cache|update) echo "DEBUG: fake apk" "$@" cmd="$1" ;; @@ -24,7 +23,7 @@ while [ $# -gt 0 ]; do rootfs="$1" ;; --quiet) - audit_prefix="" + quiet=1 shift ;; --arch) shift ;; --repositories-file) shift ;; @@ -36,13 +35,21 @@ while [ $# -gt 0 ]; do shift done -if [ "$cmd" = audit ]; then +case "$cmd" in + audit) mkdir -p etc touch etc/hosts etc/localtime + if [ -z "$quiet" ]; then + audit_prefix="U " + fi echo "${audit_prefix}etc/hosts" echo "${audit_prefix}etc/localtime" exit 0 -fi + ;; + cache|update|del) + exit 0 + ;; +esac for pkg in $pkgs; do case "$pkg" in |