diff options
| author | Michael Forney <mforney@mforney.org> | 2020-05-08 13:05:22 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-05-08 13:05:22 -0700 |
| commit | f74127556dade2c7434517caf16967e452787d79 (patch) | |
| tree | 1227b2bce10bcd9878f3944800a34d7dfaded272 /scripts/fetch-curl.sh | |
| parent | 64dcee6008ce4d8704babb9a107fd0afdb6f4993 (diff) | |
Detect decompression tool automatically
This fixes cross-compilation from macOS, whose bsdtar does support
xz through liblzma, but does not have xz(1).
Diffstat (limited to 'scripts/fetch-curl.sh')
| -rw-r--r-- | scripts/fetch-curl.sh | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/scripts/fetch-curl.sh b/scripts/fetch-curl.sh index 1e35c68d..80d70ee0 100644 --- a/scripts/fetch-curl.sh +++ b/scripts/fetch-curl.sh @@ -1,5 +1,4 @@ : "${SHA256SUM:=sha256sum}" -: "${PAXREAD:=pax -r}" set -e @@ -23,19 +22,7 @@ if ! $SHA256SUM -c sha256 2>/dev/null ; then fi while read -r _ archive ; do - case $archive in - *.tar.gz|*.tgz) - tool=gzip ;; - *.tar.bz2) - tool=bzip2 ;; - *.tar.xz) - tool=xz ;; - *) - tool= - esac - if [ -n "$tool" ] ; then - "$tool" -d -c "$archive" | $PAXREAD -s ',^[^/]*,src,' '*/*' - fi + sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,' '*/*' done <sha256 if [ -d patch ] ; then |
