mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 15:02:59 +00:00
mkalpine: install missing apps to build iso
I'm not sure if we really want this
This commit is contained in:
parent
ac04e75b81
commit
ba3d54d417
22
mkalpine
22
mkalpine
@ -1,5 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check if what we need is here
|
||||
needed="cramfs syslinux cdrkit"
|
||||
for i in $needed; do
|
||||
if ! apk info -e $i; then
|
||||
missing="$missing $i"
|
||||
fi
|
||||
done
|
||||
|
||||
# try install the missing parts
|
||||
if [ -n "$missing" ]; then
|
||||
if ! sudo apk add $missing; then
|
||||
echo "Need $missing to build alpine" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# first look for alpine.mk in current dir. Fallback to /usr/share/abuild
|
||||
mk=./alpine.mk
|
||||
if ! [ -f $mk ]; then
|
||||
@ -7,3 +23,9 @@ if ! [ -f $mk ]; then
|
||||
fi
|
||||
|
||||
make -f "$mk" APK_BIN= $@
|
||||
rc=$?
|
||||
|
||||
# uninstall the stuff we installed
|
||||
[ -n "$missing" ] && sudo apk del $missing
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user