diff options
| author | Mark Ferrell <major@homeonderanged.org> | 2014-10-21 17:30:59 -0700 |
|---|---|---|
| committer | Mark Ferrell <major@homeonderanged.org> | 2014-10-21 17:30:59 -0700 |
| commit | 011f99247294db206e973b7070bcea119a7727f2 (patch) | |
| tree | 1c2594985becfb340512e664d823708e18d3104f | |
| parent | 0f391de4eb00ba785c69dff70795cb012414d2f0 (diff) | |
Fix handling of packages and 'all' while PWD is inside a category.
| -rwxr-xr-x | libexec/build-make | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libexec/build-make b/libexec/build-make index f39fd50..4d5a6fc 100755 --- a/libexec/build-make +++ b/libexec/build-make @@ -62,16 +62,17 @@ build_make() # discard everything else. case "${package}" in (-*|*/all|all) continue;; + (*/*) CATEGORY="${package%%/*}";; + (*) if [ "${PWD##${BUILDER_PKGDIR}/}" != "${PWD}" ]; then + CATEGORY="${category%%/*}" + fi;; esac - CATEGORY="${package%%/*}" - if [ "${CATEGORY}" != 'all' ]; then - if [ ! -d "${BUILDER_PKGDIR}/${CATEGORY}" ]; then - die "invalid package category '${CATEGORY}'" - fi - if ! build-query --exists "${package}"; then - exit 1 - fi + if [ ! -d "${BUILDER_PKGDIR}/${CATEGORY}" ]; then + die "invalid package category '${CATEGORY}'" + fi + if ! build-query --exists "${package}"; then + exit 1 fi done |
