From 8dfcf8b7a0f3dad8bc822bb11ad6f5021d55cfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Wed, 2 Dec 2020 15:06:37 -0300 Subject: [PATCH] common/travis/fetch-xtools: make it work inside masterdir. --- common/travis/fetch-xtools.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/travis/fetch-xtools.sh b/common/travis/fetch-xtools.sh index 7abf44bcc12..0dd9e6c532c 100755 --- a/common/travis/fetch-xtools.sh +++ b/common/travis/fetch-xtools.sh @@ -2,9 +2,18 @@ # # fetch-xtools.sh +TAR=tar +command -v bsdtar >/dev/null && TAR=bsdtar +URL="https://github.com/leahneukirchen/xtools/archive/master.tar.gz" +FILE="xtools.tar.gz" + mkdir -p /tmp/bin /bin/echo -e '\x1b[32mInstalling xtools...\x1b[0m' -wget -q -O - https://github.com/leahneukirchen/xtools/archive/master.tar.gz | \ - gunzip | tar x -C /tmp/bin --wildcards "xtools-master/x*" \ - --strip-components=1 || exit 1 +if command -v wget >/dev/null; then + wget -q -O "$FILE" "$URL" || exit 1 +else + xbps-fetch -o "$FILE" "$URL" || exit 1 +fi + +$TAR xf "$FILE" -C /tmp/bin --strip-components=1 || exit 1