diff options
author | Roberto Oliveira <robertoguimaraes8@gmail.com> | 2017-08-29 16:40:15 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-10-04 01:10:17 +0200 |
commit | ae05c20cbd159d5b6de295364d05a9f74a65d8d0 (patch) | |
tree | 6afa8262179e62c531542150344359b70f229aae /.travis/install-alpine | |
parent | bcec60d601f559b16213013fda3256bcf7ae013a (diff) | |
download | aports-ae05c20cbd159d5b6de295364d05a9f74a65d8d0.tar.bz2 aports-ae05c20cbd159d5b6de295364d05a9f74a65d8d0.tar.xz |
travis: don't download static apk if available on the system
Just download the APK tools if the install-alpine script is running in
a system that doesn't have APK installed. This is needed for upcoming
ppc64le builder.
Diffstat (limited to '.travis/install-alpine')
-rwxr-xr-x | .travis/install-alpine | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/.travis/install-alpine b/.travis/install-alpine index d3d0618975..109c43c063 100755 --- a/.travis/install-alpine +++ b/.travis/install-alpine @@ -7,15 +7,18 @@ set -eu APK_TOOLS_URI='https://github.com/alpinelinux/apk-tools/releases/download/v2.7.2/apk-tools-2.7.2-x86_64-linux.tar.gz' APK_TOOLS_SHA256='e949d3826d08ad41622b29186f960b135711dd96aacfb80ff8238c0fd69d051f' +APK=$(which apk 2>/dev/null) || true -title 'Downloading static apk-tools' - -cd /tmp -wget -T 10 "$APK_TOOLS_URI" -echo "$APK_TOOLS_SHA256 ${APK_TOOLS_URI##*/}" | sha256sum -c -tar -xzf ${APK_TOOLS_URI##*/} -mv apk-tools-*/apk apk +if [ ! -e "$APK" ]; then + title 'Downloading static apk-tools' + cd /tmp + wget -T 10 "$APK_TOOLS_URI" + echo "$APK_TOOLS_SHA256 ${APK_TOOLS_URI##*/}" | sha256sum -c + tar -xzf ${APK_TOOLS_URI##*/} + mv apk-tools-*/apk /tmp/apk + APK=/tmp/apk +fi title 'Installing Alpine Linux' @@ -26,7 +29,7 @@ echo "$MIRROR_URI/main" > etc/apk/repositories cp -R "$CLONE_DIR"/.travis/keys etc/apk/keys cp /etc/resolv.conf etc/resolv.conf -/tmp/apk \ +$APK \ --root . --update-cache --initdb --no-progress \ add alpine-base |