From 80a050e7fad7c0674dd0f9fe59a895e97cebaedd Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 9 Jun 2022 14:24:16 +0200 Subject: [PATCH] modbuild: can now be called without specifying a build-script if no build-script has been specified, a file with the name 'build' must exist in the current directory. --- Pmodules/modbuild.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index 9b85ddd..1c0cf1a 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -320,7 +320,14 @@ parse_args() { esac shift done - [[ -n ${BUILD_SCRIPT} ]] || std::die 1 "No build-block specified!" + if [[ -z ${BUILD_SCRIPT} ]]; then + if [[ -r "${PWD}/build" ]]; then + BUILD_SCRIPT="${PWD}/build" + BUILDBLOCK_DIR=$(dirname "${BUILD_SCRIPT}") + else + std::die 1 "No build-block specified!" + fi + fi (( ${#versions[@]} > 0)) || versions+=( '.*' ) }