diff options
Diffstat (limited to 'functions.sh.in')
-rw-r--r-- | functions.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/functions.sh.in b/functions.sh.in index d71ef38..96b0586 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -19,6 +19,18 @@ if [ -f "$abuild_userconf" ]; then fi +# expects $1 to be a package directory in the aports tree ('foo' or 'main/foo') +# outputs APKBUILD's path if successful +aports_buildscript() { + [ -n "$APORTSDIR" ] || return 1 + if [ "${1#*/}" != "$1" ]; then + ( cd "$APORTSDIR/$1" && [ -f APKBUILD ] && echo "$PWD/APKBUILD" ) + else + ( cd "$APORTSDIR"/*/"$1" && [ -f APKBUILD ] && echo "$PWD/APKBUILD" ) + fi +} + + # output functions case $prog in abuild) |