common/travis/fetch-xtools: make it work inside masterdir.

This commit is contained in:
Érico Rolim 2020-12-02 15:06:37 -03:00 committed by Érico Nogueira Rolim
parent 83cc290601
commit 8dfcf8b7a0
1 changed files with 12 additions and 3 deletions

View File

@ -2,9 +2,18 @@
# #
# fetch-xtools.sh # 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 mkdir -p /tmp/bin
/bin/echo -e '\x1b[32mInstalling xtools...\x1b[0m' /bin/echo -e '\x1b[32mInstalling xtools...\x1b[0m'
wget -q -O - https://github.com/leahneukirchen/xtools/archive/master.tar.gz | \ if command -v wget >/dev/null; then
gunzip | tar x -C /tmp/bin --wildcards "xtools-master/x*" \ wget -q -O "$FILE" "$URL" || exit 1
--strip-components=1 || exit 1 else
xbps-fetch -o "$FILE" "$URL" || exit 1
fi
$TAR xf "$FILE" -C /tmp/bin --strip-components=1 || exit 1