Avoid exporting variables in build scripts

Environment variables "pollute" the build environment of packages and
can affect their output.

This change results in the removal of some files from packages that
were not meant to be packaged. It also removes the need for a
workaround in automake 1.10.3 to manually remove such files.

Variables are now saved in an .env file for each system and included
in scripts that need them using the dot operation.
This commit is contained in:
Dor Askayo 2022-09-16 10:34:07 +03:00
parent a74f3166f3
commit 3921660396
9 changed files with 45 additions and 24 deletions

View file

@ -8,6 +8,9 @@
set -e
# shellcheck source=/dev/null
. .env
# shellcheck source=sysa/helpers.sh
. helpers.sh
@ -55,4 +58,4 @@ fi
build bash-5.1
exec env -i PATH="${PATH}" PREFIX="${PREFIX}" SOURCES="${SOURCES}" DESTDIR="${DESTDIR}" DISTFILES="${DISTFILES}" SRCDIR="${SRCDIR}" HOME="${HOME}" SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" bash run2.sh
exec env -i PATH="${PATH}" HOME="${HOME}" SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" bash run2.sh