diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-08 13:33:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-08 13:33:34 +0000 |
commit | 3d79fb7036e5c42fbe00689f78c222fe66a22a44 (patch) | |
tree | cdcc7545290339ffdbfe438c16120c4753bd2e49 /mkalpine.in | |
parent | 4aee935d8c8d9410f3557be7bc3ee4bce639a6e5 (diff) | |
download | abuild-3d79fb7036e5c42fbe00689f78c222fe66a22a44.tar.gz abuild-3d79fb7036e5c42fbe00689f78c222fe66a22a44.tar.bz2 abuild-3d79fb7036e5c42fbe00689f78c222fe66a22a44.tar.xz abuild-3d79fb7036e5c42fbe00689f78c222fe66a22a44.zip |
use .in files for scripts
Diffstat (limited to 'mkalpine.in')
-rwxr-xr-x | mkalpine.in | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mkalpine.in b/mkalpine.in new file mode 100755 index 0000000..e31980a --- /dev/null +++ b/mkalpine.in @@ -0,0 +1,40 @@ +#!/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 + mk=/usr/share/abuild/alpine.mk +fi + +make -f "$mk" APK_BIN= $@ +rc=$? + +# beep when done +if [ $rc -eq 0 ]; then + for i in $(seq 0 3); do + echo -n -e "\007" + sleep 0.2 + done +fi + +# uninstall the stuff we installed +[ -n "$missing" ] && sudo apk del $missing + + +exit $? |