summaryrefslogtreecommitdiff
path: root/.travis/install
blob: b6ce051837caf0bb5785beb110781f686f8b9907 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

. $(dirname $0)/config

curl -o x86_64.apk https://distfiles.adelielinux.org/adelie/1.0/system/x86_64/apk-tools-static-2.10.4-r0.apk
tar -xzOf x86_64.apk sbin/apk.static > /tmp/apk.static
chmod a+x /tmp/apk.static

mkdir -p "$NEWROOT"/etc/apk/keys
cp "$CLONE_DIR"/.travis/*.pub "$NEWROOT"/etc/apk/keys/
/tmp/apk.static -X "https://distfiles.adelielinux.org/adelie/current/system" --root "$NEWROOT" --initdb --no-progress add adelie-core bash-binsh musl-dev gcc binutils make pkgconf utmps-dev

cd "$NEWROOT"

mount -t proc none proc
mount -t sysfs none sys
mount -R /dev dev
mount -R /run run
ln -s /run/shm dev/shm
chroot "$NEWROOT" useradd -m -c "Travis User" -s /bin/sh -G wheel -u $SUDO_UID $SUDO_USER
mkdir -p ./$CLONE_DIR
mount -B $CLONE_DIR ./$CLONE_DIR