diff --git a/config/data/pico-serprog/mkhelper.cfg b/config/data/pico-serprog/mkhelper.cfg index f4733dd..15f766b 100644 --- a/config/data/pico-serprog/mkhelper.cfg +++ b/config/data/pico-serprog/mkhelper.cfg @@ -7,4 +7,4 @@ serx="$sersrc/build/pico_serprog.uf2" picosdk="src/pico-sdk" serdir="$picosdk/src/boards/include/boards" premake="mkserprog pico" -picotool="$PWD/src/picotool/xbmkbin" +picotool="`pwd`/src/picotool/xbmkbin" diff --git a/include/git.sh b/include/git.sh index 1933a4e..31f8562 100644 --- a/include/git.sh +++ b/include/git.sh @@ -12,7 +12,7 @@ fetch_targets() e "src/$project/$tree" d && return 0 printf "Creating %s tree %s\n" "$project" "$tree" - git_prep "$loc" "$loc" "$PWD/$configdir/$tree/patches" \ + git_prep "$loc" "$loc" "`pwd`/$configdir/$tree/patches" \ "src/$project/$tree" u nuke "$project/$tree" "$project/$tree" } @@ -43,7 +43,7 @@ clone_project() printf "Downloading project '%s' to '%s'\n" "$project" "$loc" e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \ - "$url" "$bkup_url" "$PWD/config/$project/patches" "$loc"; : + "$url" "$bkup_url" "`pwd`/config/$project/patches" "$loc"; : } git_prep() diff --git a/include/inject.sh b/include/inject.sh index 824b4ce..ab2974e 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -7,7 +7,7 @@ cbcfgsdir="config/coreboot" hashfiles="vendorhashes blobhashes" # used to detect and error out # if running on an archive that needs vendor files dontflash="!!! AN ERROR OCCURED! Do NOT flash these images !!!" -tmpromdel="$PWD/tmp/DO_NOT_FLASH" +tmpromdel="`pwd`/tmp/DO_NOT_FLASH" cv="CONFIG_GBE_BIN_PATH CONFIG_IFD_BIN_PATH" diff --git a/include/lib.sh b/include/lib.sh index 31c9fd0..4e52784 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -11,7 +11,7 @@ _ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" ifdtool="elf/ifdtool/default/ifdtool" cbfstool="elf/cbfstool/default/cbfstool" rmodtool="elf/cbfstool/default/rmodtool" -tmpgit="$PWD/tmp/gitclone" +tmpgit="`pwd`/tmp/gitclone" grubdata="config/data/grub" err="err_" @@ -102,18 +102,18 @@ 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" # XBMK_CACHE is a directory, for caching downloads and git repositories -[ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$PWD/cache" -[ -z "$XBMK_CACHE" ] && export XBMK_CACHE="$PWD/cache" -[ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "$PWD/cache" ] && \ - $err "cachedir is default, $PWD/cache, but it exists and is a symlink" -[ -L "$XBMK_CACHE" ] && export XBMK_CACHE="$PWD/cache" +[ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="`pwd`/cache" +[ -z "$XBMK_CACHE" ] && export XBMK_CACHE="`pwd`/cache" +[ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "`pwd`/cache" ] && \ + $err "cachedir is default, `pwd`/cache, but it exists and is a symlink" +[ -L "$XBMK_CACHE" ] && export XBMK_CACHE="`pwd`/cache" [ -f "$XBMK_CACHE" ] && $err "cachedir '$XBMK_CACHE' exists but it's a file" # unify all temporary files/directories in a single TMPDIR [ -z "${TMPDIR+x}" ] || [ "${TMPDIR%_*}" = "/tmp/xbmk" ] || unset TMPDIR [ -n "${TMPDIR+x}" ] && export TMPDIR="$TMPDIR" if [ -z "${TMPDIR+x}" ]; then - [ -f "lock" ] && $err "$PWD/lock exists. Is a build running?" + [ -f "lock" ] && $err "`pwd`/lock exists. Is a build running?" export TMPDIR="/tmp" export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)" touch lock || $err "cannot create 'lock' file" diff --git a/script/trees b/script/trees index 3eb9d05..8e53949 100755 --- a/script/trees +++ b/script/trees @@ -176,7 +176,7 @@ configure_project() [ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1 [ -z "$mode" ] && build_dependencies - mdir="$PWD/config/submodule/$project" + mdir="`pwd`/config/submodule/$project" [ -n "$tree" ] && mdir="$mdir/$tree" [ -f "CHANGELOG" ] || check_project_hashes @@ -247,7 +247,7 @@ check_cross_compiler() x_ ./mk -f coreboot "${cbdir#src/coreboot/}" - export PATH="$PWD/$cbdir/util/crossgcc/xgcc/bin:$PATH" + export PATH="`pwd`/$cbdir/util/crossgcc/xgcc/bin:$PATH" export CROSS_COMPILE="${xarch% *}-" [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"