init.sh: merge xbmk_mkdirs with set_env

it's just two lines, and they relate.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-18 13:25:37 +01:00
parent 5f022acbf4
commit 158c56072c
+5 -8
View File
@@ -30,8 +30,8 @@ xbmk_init()
id -u 1>/dev/null 2>/dev/null || err "suid check failed (id -u)" id -u 1>/dev/null 2>/dev/null || err "suid check failed (id -u)"
[ "$(id -u)" != "0" ] || err "this command as root is not permitted" [ "$(id -u)" != "0" ] || err "this command as root is not permitted"
for init_cmd in get_version set_env lock git_init \ for init_cmd in get_version set_env lock git_init set_pyver child_exec
mkdirs set_pyver child_exec; do do
xbmk_$init_cmd "$@" || break xbmk_$init_cmd "$@" || break
done done
} }
@@ -114,6 +114,9 @@ xbmk_set_env()
xbmk_set_version xbmk_set_version
export LOCALVERSION="-$projectname-${version%%-*}" export LOCALVERSION="-$projectname-${version%%-*}"
remkdir "$xbmktmp" "$xbmklocal"
remkdir "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
} }
xbmk_lock() xbmk_lock()
@@ -156,12 +159,6 @@ xbmk_git_init()
2>/dev/null; : 2>/dev/null; :
} }
xbmk_mkdirs()
{
remkdir "$xbmktmp" "$xbmklocal"
remkdir "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
}
xbmk_set_pyver() xbmk_set_pyver()
{ {
pyv="import sys; print(sys.version_info[:])" pyv="import sys; print(sys.version_info[:])"