Merge pull request #6441 from heitbaum/clean11

scripts/makefile_helper: make sure variables are set before running an rm
This commit is contained in:
Matthias Reichl 2022-04-30 12:04:54 +02:00 committed by GitHub
commit 0a76a32d5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,11 @@ set -e
# If config/options can't be sourced, abort. PWD isn't the expected ROOT. # If config/options can't be sourced, abort. PWD isn't the expected ROOT.
. config/options "" . config/options ""
if [ -z "${BUILD_BASE}" -o -z "${BUILD_ROOT}" ]; then
# make sure variables are set before running an rm
echo "error: ${0}: both BUILD_BASE and BUILD_ROOT must be set when running \"[clean|distclean]\"; aborting"
exit 1
fi
# task handling # task handling
case $1 in case $1 in
--clean) --clean)