aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/install-alpine
blob: 538d10fe885d67ce979f5aa4ac596bf7a401351c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# vim: set ts=4:
set -eu

. "$(dirname "$0")"/common.sh

APK_TOOLS_URI='http://nl.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r2.apk'
APK_TOOLS_SHA256='e163b7d67e81946d67abb8bb1da3449792b52ad872d3b59967f90d445b50784f'


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"

echo "$MIRROR_URI/main" > etc/apk/repositories
cp -R "$CLONE_DIR"/.travis/keys etc/apk/keys
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