From e5bb6756c125c1b2d70e63aa90b0d1485300f062 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 13 Nov 2018 15:06:05 -0800 Subject: Allow overriding pax command with PAXREAD Most systems do not have pax installed by default, or it is not available at all. However, since we are relying on the -s flag for member name substitution, we can't just use a tar command that works everywhere. Instead, support the environment variable PAXREAD to specify the command to use in place of `pax -r`. Since bsdtar from libarchive supports -s, we can set PAXREAD='bsdtar -xf -'. --- scripts/fetch-curl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fetch-curl.sh b/scripts/fetch-curl.sh index 86f7598e..4604a398 100644 --- a/scripts/fetch-curl.sh +++ b/scripts/fetch-curl.sh @@ -31,7 +31,7 @@ while read -r checksum archive ; do tool= esac if [ -n "$tool" ] ; then - "$tool" "$archive" | pax -r -s '/^\.\|[^\/]*/src/' '*/*' + "$tool" "$archive" | ${PAXREAD:-pax -r} -s ',^[^/]*,src,' '*/*' fi done