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.
This commit is contained in:
2022-06-09 14:24:16 +02:00
parent 5337160b7a
commit 80a050e7fa
+8 -1
View File
@@ -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+=( '.*' )
}