diff options
-rwxr-xr-x | dabuild.in | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -17,9 +17,9 @@ if [ "$DABUILD_DEBUG" = "true" ]; then fi ## check running from within an `aports` tree -if [ "${PWD%*/aports*}" = "$PWD" ]; then +if [ "${PWD%*/aports/*}" = "$PWD" ]; then die "Error: expecting to be run from within an aports tree!" \ - "Could not find '/aports' in the current path ($PWD)" + "Could not find '/aports/' in the current path: $PWD" exit 1 fi @@ -48,7 +48,7 @@ else fi ## check $DABUILD_PACKAGES is a writable directory -ABUILD_PACKAGES=${DABUILD_PACKAGES:-${PWD%/aports*}/packages/${ABUILD_VERSION}} +ABUILD_PACKAGES=${DABUILD_PACKAGES:-${PWD%/aports/*}/packages/${ABUILD_VERSION}} mkdir -p $ABUILD_PACKAGES if [ ! \( -d "$ABUILD_PACKAGES" -a -w "$ABUILD_PACKAGES" \) ]; then @@ -59,7 +59,7 @@ fi ## setup volumes; use named volumes as cache if desired ABUILD_VOLUMES="-v ${HOME}/.abuild:/home/builder/.abuild \ - -v ${PWD%/aports*}/aports:/home/builder/aports \ + -v ${PWD%/aports/*}/aports:/home/builder/aports \ -v ${ABUILD_PACKAGES}:/home/builder/packages" if [ -f "/etc/abuild.conf" ]; then @@ -87,7 +87,7 @@ if [ "$DABUILD_CACHE" = "true" ]; then fi ## go! -ABUILD_WORKDIR=/home/builder/aports${PWD#*/aports} +ABUILD_WORKDIR=/home/builder/aports/${PWD#*/aports/} DOCKER="docker run -ti $ABUILD_VOLUMES -e DABUILD_DEBUG $DABUILD_ARGS" $DOCKER --workdir $ABUILD_WORKDIR \ %%ABUILD_IMAGE%%:$ABUILD_VERSION-$DABUILD_ARCH "$@" |