diff options
| author | Richard Mortier <mort@cantab.net> | 2019-03-01 16:55:42 +0000 |
|---|---|---|
| committer | Richard Mortier <mort@cantab.net> | 2019-03-01 16:55:42 +0000 |
| commit | d6457141fa1cccb24ac8a1bfa35a143265ba7aeb (patch) | |
| tree | 8c0299ab239b85c7c953d5ee8268bf7e269bd53b | |
| parent | 4587485cf534510b850acdf2bbae3b834b29f10e (diff) | |
| download | docker-abuild-d6457141fa1cccb24ac8a1bfa35a143265ba7aeb.tar.bz2 docker-abuild-d6457141fa1cccb24ac8a1bfa35a143265ba7aeb.tar.xz | |
abuild: slightly more defensive
Signed-off-by: Richard Mortier <mort@cantab.net>
| -rwxr-xr-x | abuild | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3,11 +3,17 @@ set -e ## debug -if [[ "$DOCKER_ABUILD_DEBUG" = "true" ]]; then +if [ "$DOCKER_ABUILD_DEBUG" = "true" ]; then set -x PS4='$LINENO: ' fi +if [ "${PWD%aports/*}" = "$PWD" ]; then + echo "Error: expecting to be run from within an aports/ tree!" + echo "Could not find 'aports/' in the current path ($PWD)" + exit 1 +fi + DOCKER_VOLUMES=" -v $PWD:/cwd -v ${HOME}/.abuild:/home/builder/.abuild |
