Files
horizon-packages/common/travis/fetch-xbps.sh
T

23 lines
523 B
Bash
Raw Normal View History

2025-02-22 19:19:27 -05:00
#!/bin/bash
2021-05-22 00:14:56 +02:00
#
# fetch-xbps.sh
command -v xbps-uhelper >/dev/null && exit
TAR=tar
command -v bsdtar >/dev/null && TAR=bsdtar
ARCH=$(uname -m)-musl
VERSION=0.59_5
2022-06-14 20:29:44 -04:00
URL="https://repo-ci.voidlinux.org/static/xbps-static-static-${VERSION}.${ARCH}.tar.xz"
2021-05-22 00:14:56 +02:00
FILE=${URL##*/}
mkdir -p /tmp/bin
/bin/echo -e '\x1b[32mInstalling xbps...\x1b[0m'
if command -v wget >/dev/null; then
wget -q -O "$FILE" "$URL" || exit 1
else
curl -s -o "$FILE" "$URL" || exit 1
fi
$TAR xf "$FILE" -C /tmp/bin --strip-components=3 ./usr/bin || exit 1