diff options
author | Leah Rowe <leah@libreboot.org> | 2025-10-02 06:51:03 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-10-02 06:51:03 +0100 |
commit | 85b10a674b8cbb141db340c2be1b4be33237c9d4 (patch) | |
tree | c93d8e985c470c182d6596644c04f11eca5dc1af | |
parent | 99f2c0fcf9791247b32248774fb465b950747a52 (diff) |
init.sh: reduce the use of eval statements
also remove the unused _nogit variable
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/init.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/init.sh b/include/init.sh index 528e1eae..f14fa5ab 100644 --- a/include/init.sh +++ b/include/init.sh @@ -12,12 +12,12 @@ projectname="libreboot" projectsite="https://libreboot.org/" if [ -z "${PATH+x}" ]; then - export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" +export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" fi -eval "`setvars "" _nogit board reinstall versiondate aur_notice configdir \ +eval "`setvars "" board reinstall versiondate aur_notice configdir xbmkpath \ datadir version xbmkpwd relname xbmkpwd xbtmp python pyver xbmklock \ - cvxbmk cvchk xbmkpath is_child basetmp`" + cvxbmk cvchk is_child basetmp`" xbmk_init() { @@ -152,7 +152,9 @@ xbmk_child_set_env() xbmk_child_set_tmp() { - eval `setvars "" badtmp xbtmpchk locktmp` + badtmp="" + xbtmpchk="" + locktmp="" xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \ err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@" @@ -393,8 +395,8 @@ xbmk_git_init() x_ date --version | grep "GNU coreutils" 1>/dev/null 2>/dev/null || \ err "Non-GNU date implementation" "xbmk_git_init" "$@" - eval "$(setvars "$(x_ date -Rud @$versiondate)" cdate _nogit || err)" \ - || err "can't get date" "xbmk_git_init" "$@" + cdate="`x_ date -Rud @$versiondate || err "can't get date"`" || \ + err "can't get date" "xbmk_git_init" "$@" x_ git init 1>/dev/null 2>/dev/null x_ git add -A . 1>/dev/null 2>/dev/null |