From 253aa81a3f991b8951c964e62859573b7a971440 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 18 May 2025 11:25:35 +0100 Subject: init.sh: move PATH init to set_env we must only set this in the parent instance, not child instances. this prevents the variable from being over-populated with repeated entries. Signed-off-by: Leah Rowe --- include/init.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/init.sh b/include/init.sh index 807174a8..2c65d0b6 100644 --- a/include/init.sh +++ b/include/init.sh @@ -12,11 +12,10 @@ projectsite="https://libreboot.org/" [ -z "${PATH+x}" ] && \ export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" -xbmkpath="$PATH" eval "`setvars "" _nogit board reinstall versiondate aur_notice configdir \ datadir version xbmkpwd relname xbmkpwd xbmktmp python pyver xbmklocal \ - xbmklock cvxbmk cvchk`" + xbmklock cvxbmk cvchk xbmkpath`" xbmk_init() { @@ -123,6 +122,7 @@ xbmk_set_version() xbmk_set_env() { + xbmkpath="$PATH" export LOCALVERSION="-$projectname-${version%%-*}" # XBMK_CACHE is a directory, for caching downloads and git repon @@ -157,6 +157,9 @@ xbmk_set_env() export TMPDIR="/tmp" export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)" xbmktmp="$TMPDIR" + + export PATH="$XBMK_CACHE/xbmkpath:$XBMK_CACHE/gnupath:$PATH" + xbmkpath="$PATH" } xbmk_lock() @@ -196,7 +199,6 @@ xbmk_create_tmpdir() xbmk_create_pathdirs() { remkdir "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath" - export PATH="$XBMK_CACHE/xbmkpath:$XBMK_CACHE/gnupath:$PATH" ( # set up python v3.x in PATH, in case it's not set up correctly. # see code above that detected the correct python3 command. -- cgit v1.2.1