00-distfiles.sh: allow bsdtar for ruby gems

This commit is contained in:
q66 2020-01-11 18:43:48 +01:00
parent f317ed5e7e
commit 2b7fb8124c
1 changed files with 10 additions and 1 deletions

View File

@ -127,7 +127,16 @@ hook() {
fi
;;
gem)
tar -xOf $srcdir/$curfile data.tar.gz | tar -xz -C $extractdir --transform="s,^,${wrksrc##*/}/,"
case "$TAR_CMD" in
*bsdtar)
$TAR_CMD -xOf $srcdir/$curfile data.tar.gz | \
$TAR_CMD -xz -C $extractdir -s ",^,${wrksrc##*/}/," -f -
;;
*)
$TAR_CMD -xOf $srcdir/$curfile data.tar.gz | \
$TAR_CMD -xz -C $extractdir --transform="s,^,${wrksrc##*/}/,"
;;
esac
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi