summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-14 11:20:39 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-14 11:30:49 +0100
commitc0402ef6422b528d3cc56706a7f455f5691b07d3 (patch)
treebe69989fe7e75e005d99e1d3e2c492e62c76fc2b
parent16e04411f209c88f214ce84cfa2c42c3af1c8408 (diff)
mk: simplify xbmkpwd initialisation
do it from mk instead. we don't need to run pwd anymore, because we just get the path and cd to it, setting that as the path. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/env/init.sh3
-rwxr-xr-xmk4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/env/init.sh b/include/env/init.sh
index 23850c12..afdbb80f 100644
--- a/include/env/init.sh
+++ b/include/env/init.sh
@@ -12,11 +12,10 @@ sha512sum="util/sbase/sha512sum"
eval "`newvar aur_notice basetmp board checkvarschk checkvarsxbmk configdir \
datadir is_child python pyver reinstall relname version versiondate \
- xbmklock xbmkpath xbmkpwd xbmkpwd xbtmp`"
+ xbmklock xbmkpath xbtmp`"
xbmk_init()
{
- xbmkpwd="`pwd || err "Cannot generate PWD"`" || err "!" xbmk_init "$@"
xbmklock="$xbmkpwd/lock"
basetmp="$xbmkpwd/xbmkwd"
sha512sum="$xbmkpwd/util/sbase/sha512sum"
diff --git a/mk b/mk
index 49750e3c..0834464c 100755
--- a/mk
+++ b/mk
@@ -21,7 +21,9 @@ xbarg0="$0"
[ "${xbarg0##*/}" = "$xbarg0" ] && \
xbarg0="`command -v "$xbarg0"`"
-x_ cd "`findpath "$xbarg0"`"
+xbmkpwd="$(dirname "$(findpath "$xbarg0")")"
+
+x_ cd "$xbmkpwd"
. "include/env/init.sh"
x_ xbmk_init "$@"