Spotter-VM/zz-build/install-toolchain.sh

31 lines
779 B
Bash
Raw Normal View History

2018-10-26 21:54:34 +02:00
#!/bin/sh
set -e
cd $(realpath $(dirname "${0}"))
# Install Alpine SDK and useful tools
2018-10-26 21:54:34 +02:00
apk update
apk add alpine-sdk git file htop less openssh-server openssh-sftp-server tar xz
# Copy root profile files and settings
mkdir -p /root/.config/htop /root/.ssh
cp root/.profile /root/.profile
cp root/.ssh/authorized_keys /root/.ssh/authorized_keys
cp root/.config/htop/htoprc /root/.config/htop/htoprc
# Start SSH
rc-update add sshd boot
service sshd start
2018-10-26 21:54:34 +02:00
# Prepare build toolchain
adduser root abuild
cp etc/abuild.conf /etc/abuild.conf
cp usr/bin/abuild /usr/bin/abuild
cp usr/bin/fix-apk /usr/bin/fix-apk
cp usr/bin/lxc-build /usr/bin/lxc-build
cp usr/bin/lxc-pack /usr/bin/lxc-pack
mkdir -p /srv/build/lxc
# Supply /srv/build/repokey.rsa
# Supply /srv/build/packages.key