workflows: fetch xbps for lint step

This commit is contained in:
Piotr Wójcik 2021-05-22 00:14:56 +02:00 committed by Piotr
parent 20fd23adbd
commit d06bb7e98f
2 changed files with 23 additions and 0 deletions

View File

@ -19,6 +19,7 @@ jobs:
fetch-depth: 200
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
- run: common/travis/fetch-xtools.sh
- run: common/travis/xlint.sh
# GitHub Action create a merge commit, ignore it

22
common/travis/fetch-xbps.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
#
# 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
URL="https://alpha.de.repo.voidlinux.org/static/xbps-static-static-${VERSION}.${ARCH}.tar.xz"
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