Use .env file for passing environmental variables in sysa.

This commit is contained in:
Andrius Štikonas 2023-03-05 20:27:12 +00:00
parent 364cacb1ce
commit ef2deec60e
4 changed files with 26 additions and 9 deletions

View file

@ -195,4 +195,14 @@ build libtool-2.2.4
build bash-5.2.15
exec env -i PATH="${PATH}" PREFIX="${PREFIX}" LIBDIR="${LIBDIR}" SOURCES="${SOURCES}" DISTFILES="${DISTFILES}" DESTDIR="${DESTDIR}" SRCDIR="${SRCDIR}" bash run2.sh
cat > .env <<- EOF
export PATH=${PATH}
PREFIX=${PREFIX}
LIBDIR=${LIBDIR}
SOURCES=${SOURCES}
DESTDIR=${DESTDIR}
DISTFILES=${DISTFILES}
SRCDIR=${SRCDIR}
EOF
exec env -i bash run2.sh

View file

@ -8,6 +8,9 @@
set -e
# shellcheck source=/dev/null
. .env
# shellcheck source=sysa/helpers.sh
. helpers.sh