Truncate .env file when writing to it

This makes no functional difference in practice, but is a bit cleaner
in case init scripts are executed multiple times (for testing or
otherwise).
This commit is contained in:
Dor Askayo 2023-01-28 18:14:17 +02:00
parent 46a5773f66
commit c3a745c997
2 changed files with 2 additions and 3 deletions

View File

@ -37,8 +37,7 @@ install_tar util-linux-2.19.1 0
# Begin sysb bootstrapping process
cd "${SOURCES}"
# shellcheck disable=SC2129
echo "PREFIX=${PREFIX}" >> .env
echo "PREFIX=${PREFIX}" > .env
echo "SOURCES=${SOURCES}" >> .env
exec ./run.sh

View File

@ -63,8 +63,8 @@ ln -s /usr/bin/bash /usr/bin/sh
# Begin sysc bootstrapping process
cd "${SOURCES}"
echo "PREFIX=${PREFIX}" > .env
# shellcheck disable=SC2129
echo "PREFIX=${PREFIX}" >> .env
echo "SOURCES=${SOURCES}" >> .env
echo "DESTDIR=${DESTDIR}" >> .env
echo "DISTFILES=${DISTFILES}" >> .env