Files
oasis-linux-mirror/pkg/git/fetch.sh
Michael Forney e5bb6756c1 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 -'.
2019-03-11 12:20:37 -07:00

19 lines
279 B
Bash

set -e
(. ./scripts/fetch-git.sh "$@")
cd "$1"
shift
if [ -e src/man ] ; then
rm -rf src/man
fi
if ! sha256sum -c sha256 2>/dev/null ; then
curl -L -O -K url
sha256sum -c sha256
fi
read -r checksum archive <sha256
xzcat "$archive" | ${PAXREAD:-pax -r} -s ',^\.,src/man,'