diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-18 11:25:35 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-18 11:26:28 +0100 |
commit | 253aa81a3f991b8951c964e62859573b7a971440 (patch) | |
tree | 62a03f14c6297caf34ba3628a5d7c38d53c2834d | |
parent | e05a18d35131acd2007afc56aa07a321f6f2dfdb (diff) |
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 <leah@libreboot.org>
-rw-r--r-- | include/init.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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. |