mirror of
https://github.com/oasislinux/oasis.git
synced 2026-02-05 11:33:57 +01:00
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 -'.
19 lines
279 B
Bash
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,'
|