zellij: update to 0.41.2
[void-pkg.git] / common / travis / fetch-xbps.sh
blobe5c588142826c7c6db91fabf01fab93a3e91e61a
1 #!/bin/sh
3 # fetch-xbps.sh
5 command -v xbps-uhelper >/dev/null && exit
6 TAR=tar
7 command -v bsdtar >/dev/null && TAR=bsdtar
8 ARCH=$(uname -m)-musl
9 VERSION=0.59_5
10 URL="https://repo-ci.voidlinux.org/static/xbps-static-static-${VERSION}.${ARCH}.tar.xz"
11 FILE=${URL##*/}
13 mkdir -p /tmp/bin
15 /bin/echo -e '\x1b[32mInstalling xbps...\x1b[0m'
16 if command -v wget >/dev/null; then
17 wget -q -O "$FILE" "$URL" || exit 1
18 else
19 curl -s -o "$FILE" "$URL" || exit 1
22 $TAR xf "$FILE" -C /tmp/bin --strip-components=3 ./usr/bin || exit 1