From 34660c33d98668d288cd2b35917a851dad6cd365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 22 May 2021 00:14:56 +0200 Subject: [PATCH] workflows: fetch xbps for xlint --- .github/workflows/build.yaml | 1 + common/travis/fetch-xbps.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 common/travis/fetch-xbps.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb96a151c599..5ca5de2244d4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 diff --git a/common/travis/fetch-xbps.sh b/common/travis/fetch-xbps.sh new file mode 100755 index 000000000000..aac9bd980006 --- /dev/null +++ b/common/travis/fetch-xbps.sh @@ -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 +VERSION=0.59_5 +URL="https://alpha.de.repo.voidlinux.org/static/xbps-static-static-${VERSION}.x86_64-musl.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 || exit 1 +rm -r /tmp/bin/xbps