25 lines
505 B
Bash
25 lines
505 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Install base builder
|
||
|
if test $(id -u) -ne 0; then
|
||
|
echo "Be root is better for this action !!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if test ! -f /etc/apk/world; then
|
||
|
echo "Maybe, You should try on an Alpine !"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Packages needed
|
||
|
apk add alpine-sdk build-base apk-tools alpine-conf busybox fakeroot syslinux xorriso squashfs-tools sudo
|
||
|
|
||
|
# User setup
|
||
|
adduser build -G abuild
|
||
|
|
||
|
# Grant unrestricted sudo to abuild group
|
||
|
echo "%abuild ALL=(ALL) ALL" > /etc/sudoers.d/abuild
|
||
|
|
||
|
# Also, update apk
|
||
|
apk update
|