summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-09-13 01:33:59 -0500
committerMax Rees <maxcrees@me.com>2020-03-07 17:36:55 -0600
commit3c98bd6607cb1eb24c650ea66feccd7283ebfb61 (patch)
treef37d094f8c8d3e8b317ba98f5eed71a0e084f5d6
parent30ebdd21fb6a929e5f0071029ac91973fa4e78f3 (diff)
downloadabuild-3c98bd6607cb1eb24c650ea66feccd7283ebfb61.tar.gz
abuild-3c98bd6607cb1eb24c650ea66feccd7283ebfb61.tar.bz2
abuild-3c98bd6607cb1eb24c650ea66feccd7283ebfb61.tar.xz
abuild-3c98bd6607cb1eb24c650ea66feccd7283ebfb61.zip
checkapk: print symlinks correctly
-rw-r--r--checkapk.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/checkapk.in b/checkapk.in
index 429c03d..df2d293 100644
--- a/checkapk.in
+++ b/checkapk.in
@@ -52,15 +52,22 @@ filelist() {
local tar_fmt
case "$tar_flavor" in
- GNU)
+ GNU|busybox)
+ # GNU:
# -rw-r--r-- root/root 737 2019-06-14 20:45 .PKGINFO
- tar_fmt='{ print $1, $2, $NF }';;
+ # lrwxrwxrwx root/root 0 2019-09-13 06:01 usr/lib/libixion-0.15.so.0 -> libixion-0.15.so.0.0.0
+ # busybox:
+ # -rw-r--r-- root/root 737 2019-06-14 20:45:29 .PKGINFO
+ # lrwxrwxrwx root/root 0 2019-09-13 06:01:49 usr/lib/libixion-0.15.so.0 -> libixion-0.15.so.0.0.0
+ tar_fmt='{ printf "%s %s ", $1, $2 }
+ /^l/ { printf "%s -> ", $(NF-2) }
+ { print $NF }';;
libarchive)
# -rw-r--r-- 0 root root 737 Jun 14 15:45 .PKGINFO
- tar_fmt='{ printf "%s %s/%s %s\n", $1, $3, $4, $NF }';;
- busybox)
- # -rw-r--r-- root/root 737 2019-06-14 20:45:29 .PKGINFO
- tar_fmt='{ print $1, $2, $NF }';;
+ # lrwxrwxrwx 0 root root 0 Sep 13 01:01 usr/lib/libixion-0.15.so.0 -> libixion-0.15.so.0.0.0
+ tar_fmt='{ printf "%s %s/%s ", $1, $3, $4 }
+ /^l/ { printf "%s -> ", $(NF-2) }
+ { print $NF }';;
esac
tar -ztvf "$apk" | grep -ve ' \.SIGN\.' \