aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/install-alpine
diff options
context:
space:
mode:
author7heo <7heo@mail.com>2016-09-17 15:24:46 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-01-18 12:50:54 +0100
commit47e87b829c09ae3c6f3bcbabc9824d4be9bf35f9 (patch)
treea01b14d301943365196e4b2bedad8feabbb45bf7 /.travis/install-alpine
parent5906619ff0d1cca4466cb4e93595c6cc5f005111 (diff)
downloadmkinitfs-47e87b829c09ae3c6f3bcbabc9824d4be9bf35f9.tar.bz2
mkinitfs-47e87b829c09ae3c6f3bcbabc9824d4be9bf35f9.tar.xz
nlplug-findfs: enable automated testing
Diffstat (limited to '.travis/install-alpine')
-rwxr-xr-x.travis/install-alpine34
1 files changed, 34 insertions, 0 deletions
diff --git a/.travis/install-alpine b/.travis/install-alpine
new file mode 100755
index 0000000..756bbd8
--- /dev/null
+++ b/.travis/install-alpine
@@ -0,0 +1,34 @@
+#!/bin/sh
+# vim: set ts=4:
+set -eu
+
+. "$(dirname "$0")"/common.sh
+
+APK_TOOLS_URI='http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/apk-tools-static-2.6.7-r0.apk'
+APK_TOOLS_SHA256='342458308b8ebdb6a91d347b6b2cced7349c0cd0560a7fd7cdd71c5e1aa2b9f3'
+
+
+title 'Downloading apk-tools-static'
+
+cd /tmp
+wget "$APK_TOOLS_URI"
+echo "$APK_TOOLS_SHA256 $(basename "$APK_TOOLS_URI")" | sha256sum -c
+tar -xzf $(basename "$APK_TOOLS_URI")
+
+
+title 'Installing Alpine Linux'
+
+mkdir -p "$ALPINE_ROOT"/etc/apk
+cd "$ALPINE_ROOT"
+
+cp -R "$CLONE_DIR"/.travis/keys etc/apk/keys
+cp "$CLONE_DIR"/.travis/repositories etc/apk/repositories
+cp /etc/resolv.conf etc/resolv.conf
+
+/tmp/sbin/apk.static \
+ --root . --update-cache --initdb --no-progress \
+ add alpine-base
+
+mount -t proc none proc
+mount --rbind /sys sys
+mount --rbind /dev dev