commit: c3a745c99787c20f0c92e9c5c807299f90195ff4
parent 46a5773f66dbd95e4c4ca54b3bf6b7803b5ed17b
Author: Dor Askayo <dor.askayo@gmail.com>
Date: Sat, 28 Jan 2023 18:14:17 +0200
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).
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sysb/init b/sysb/init
@@ -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
diff --git a/sysc/init b/sysc/init
@@ -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