Installation de l'environnement de développement de YunoRock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
873 B

#!/usr/bin/env sh
alpine_install=${INSTALL:-'alpine-chroot-install'}
alpine_directory=${DIR:-'/alpine'}
# DL alpine install script
if ! test -f "$alpine_install"; then
wget https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.9.0/alpine-chroot-install -O "$alpine_install" \
&& echo 'e5dfbbdc0c4b3363b99334510976c86bfa6cb251 alpine-chroot-install' | sha1sum -c \
|| exit 1
chmod +x "$alpine_install"
fi
# Install Alpine
if ! test -d "$alpine_directory"; then
sudo sh ./$alpine_install -d $alpine_directory -p build-base -p git -p zsh -p lua-filesystem -p luarocks5.1 -p lua-toml -p moonscript -p abuild -p lua-argparse || exit 1
fi
# Set rc_sys="prefix" to not disturb systemd on current system
sudo sed -e 's/#rc_sys=""/rc_sys="prefix"/g' -i "$alpine_directory/etc/rc.conf"
# Launch chroot
sh $alpine_directory/enter-chroot ./build