mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
xbmk: rename xbmklocal/xbmktmp variables
shorten them Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
|
||||
depend subcurl_bkup repofail`"
|
||||
|
||||
tmpgit="$xbmklocal/gitclone"
|
||||
tmpgit="$xbloc/gitclone"
|
||||
tmpgitcache="$XBMK_CACHE/tmpgit"
|
||||
|
||||
fetch_targets()
|
||||
|
||||
+6
-7
@@ -14,13 +14,13 @@ projectsite="https://libreboot.org/"
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
|
||||
|
||||
eval "`setvars "" _nogit board reinstall versiondate aur_notice configdir \
|
||||
datadir version xbmkpwd relname xbmkpwd xbmktmp python pyver xbmklocal \
|
||||
datadir version xbmkpwd relname xbmkpwd xbtmp python pyver xbloc \
|
||||
xbmklock cvxbmk cvchk xbmkpath`"
|
||||
|
||||
xbmk_init()
|
||||
{
|
||||
xbmkpwd="`pwd`" || err "Cannot generate PWD"
|
||||
xbmklocal="$xbmkpwd/tmp"
|
||||
xbloc="$xbmkpwd/tmp"
|
||||
xbmklock="$xbmkpwd/lock"
|
||||
|
||||
export PWD="$xbmkpwd"
|
||||
@@ -71,7 +71,7 @@ xbmk_set_env()
|
||||
# unify all temporary files/directories in a single TMPDIR
|
||||
[ -z "${TMPDIR+x}" ] || [ "${TMPDIR%_*}" = "/tmp/xbmk" ] || \
|
||||
unset TMPDIR
|
||||
[ -n "${TMPDIR+x}" ] && export TMPDIR="$TMPDIR" && xbmktmp="$TMPDIR"
|
||||
[ -n "${TMPDIR+x}" ] && export TMPDIR="$TMPDIR" && xbtmp="$TMPDIR"
|
||||
[ -z "${TMPDIR+x}" ] || is_child="y" # child instance, so return
|
||||
|
||||
if [ "$is_child" = "y" ]; then
|
||||
@@ -87,7 +87,7 @@ xbmk_set_env()
|
||||
# parent instance of xbmk, so don't return. set up TMPDIR
|
||||
export TMPDIR="/tmp"
|
||||
export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)"
|
||||
xbmktmp="$TMPDIR"
|
||||
xbtmp="$TMPDIR"
|
||||
|
||||
export XBMK_CACHE="$xbmkpwd/cache"
|
||||
[ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "$xbmkpwd/cache" ] && \
|
||||
@@ -107,8 +107,7 @@ xbmk_set_env()
|
||||
xbmk_set_version
|
||||
export LOCALVERSION="-$projectname-${version%%-*}"
|
||||
|
||||
remkdir "$xbmktmp" "$xbmklocal"
|
||||
remkdir "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
|
||||
remkdir "$xbtmp" "$xbloc" "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
|
||||
|
||||
xbmk_set_pyver
|
||||
}
|
||||
@@ -211,7 +210,7 @@ xbmk_child_exec()
|
||||
{
|
||||
xbmk_rval=0
|
||||
( x_ ./mk "$@" ) || xbmk_rval=1
|
||||
( x_ rm -Rf "$xbmklocal" "$xbmktmp" ) || xbmk_rval=1
|
||||
( x_ rm -Rf "$xbloc" "$xbtmp" ) || xbmk_rval=1
|
||||
( x_ rm -f "$xbmklock" ) || xbmk_rval=1
|
||||
exit $xbmk_rval
|
||||
}
|
||||
|
||||
+7
-7
@@ -103,36 +103,36 @@ patch_release()
|
||||
|
||||
readkconfig()
|
||||
{
|
||||
x_ rm -f "$xbmktmp/cbcfg"
|
||||
x_ rm -f "$xbtmp/cbcfg"
|
||||
fx_ scankconfig x_ find "$boarddir/config" -type f
|
||||
eval "`setcfg "$xbmktmp/cbcfg" 1`"
|
||||
eval "`setcfg "$xbtmp/cbcfg" 1`"
|
||||
setvfile "$@" || return 1; :
|
||||
}
|
||||
|
||||
scankconfig()
|
||||
{
|
||||
for cbc in $cv; do
|
||||
grep "$cbc" "$1" 1>>"$xbmktmp/cbcfg" 2>/dev/null || :
|
||||
grep "$cbc" "$1" 1>>"$xbtmp/cbcfg" 2>/dev/null || :
|
||||
done
|
||||
}
|
||||
|
||||
modify_mac()
|
||||
{
|
||||
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
|
||||
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbloc/gbe"
|
||||
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
||||
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil && \
|
||||
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
|
||||
x_ "$nvm" "$xbloc/gbe" setmac "$new_mac"
|
||||
|
||||
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
|
||||
printf "\nThe following GbE NVM data will be written:\n"
|
||||
x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
|
||||
x_ "$nvm" "$xbloc/gbe" dump | grep -v "bytes read from file" || :
|
||||
}
|
||||
|
||||
newmac()
|
||||
{
|
||||
e "$1" f && xchanged="y" && x_ \
|
||||
"$ifdtool" $ifdprefix -i GbE:"$xbmklocal/gbe" "$1" -O "$1"; :
|
||||
"$ifdtool" $ifdprefix -i GbE:"$xbloc/gbe" "$1" -O "$1"; :
|
||||
}
|
||||
|
||||
remktar()
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ release()
|
||||
[ -e "$reldest" ] && \
|
||||
err "already exists: \"$reldest\""
|
||||
|
||||
vdir="$XBMK_CACHE/relpwd/${xbmktmp##*/}/$version"
|
||||
vdir="$XBMK_CACHE/relpwd/${xbtmp##*/}/$version"
|
||||
rsrc="$vdir/${relname}_src"
|
||||
|
||||
remkdir "$vdir"
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@ mkcorebootbin()
|
||||
{
|
||||
[ "$target" = "$tree" ] && return 0
|
||||
|
||||
tmprom="$xbmktmp/coreboot.rom"
|
||||
tmprom="$xbtmp/coreboot.rom"
|
||||
$dry x_ cp "$srcdir/build/coreboot.rom" "$tmprom"
|
||||
|
||||
initmode="${defconfig##*/}"
|
||||
@@ -158,8 +158,8 @@ add_grub()
|
||||
_grubname="fallback/payload"
|
||||
cbfs "$tmprom" "$grubelf" "$_grubname"
|
||||
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \
|
||||
> "$xbmktmp/tmpcfg" || err "$target: !insert scandisk"
|
||||
cbfs "$tmprom" "$xbmktmp/tmpcfg" scan.cfg raw
|
||||
> "$xbtmp/tmpcfg" || err "$target: !insert scandisk"
|
||||
cbfs "$tmprom" "$xbtmp/tmpcfg" scan.cfg raw
|
||||
[ "$initmode" != "normal" ] && [ "$displaymode" != "txtmode" ] && \
|
||||
cbfs "$tmprom" "$grubdata/background/background1280x800.png" \
|
||||
"background.png" raw; :
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@ trees()
|
||||
|
||||
mkhelpercfg="$datadir/mkhelper.cfg"
|
||||
if e "$mkhelpercfg" f missing; then
|
||||
mkhelpercfg="$xbmktmp/mkhelper.cfg"
|
||||
mkhelpercfg="$xbtmp/mkhelper.cfg"
|
||||
x_ touch "$mkhelpercfg"
|
||||
fi
|
||||
|
||||
@@ -181,9 +181,9 @@ check_project_hashes()
|
||||
|
||||
fx_ "x_ sha512sum" find "$datadir" "$configdir/$tree" "$mdir" \
|
||||
-type f -not -path "*/.git*/*" | awk '{print $1}' > \
|
||||
"$xbmktmp/project.hash" || err "!h $project $tree"
|
||||
"$xbtmp/project.hash" || err "!h $project $tree"
|
||||
|
||||
pjhash="$(sha512sum "$xbmktmp/project.hash" | awk '{print $1}')" || :
|
||||
pjhash="$(sha512sum "$xbtmp/project.hash" | awk '{print $1}')" || :
|
||||
[ "$pjhash" != "$old_pjhash" ] && badhash="y"
|
||||
[ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
|
||||
|
||||
|
||||
+7
-7
@@ -150,9 +150,9 @@ extract_intel_me()
|
||||
{
|
||||
e "$mecleaner" f not && err "$cbdir: me_cleaner missing"
|
||||
|
||||
_7ztest="$xbmklocal/metmp/a"
|
||||
_metmp="$xbmklocal/me.bin"
|
||||
x_ rm -f "$_metmp" "$xbmklocal/a"
|
||||
_7ztest="$xbloc/metmp/a"
|
||||
_metmp="$xbloc/me.bin"
|
||||
x_ rm -f "$_metmp" "$xbloc/a"
|
||||
|
||||
mfs="" && [ "$ME11bootguard" = "y" ] && mfs="--whitelist MFS" && \
|
||||
chkvars ME11delta ME11version ME11sku ME11pch
|
||||
@@ -178,7 +178,7 @@ find_me()
|
||||
|
||||
_7ztest="${_7ztest}a" && _r="-r" && [ -n "$mfs" ] && _r=""
|
||||
|
||||
"$mecleaner" $mfs $_r -t -O "$xbmklocal/a" -M "$_metmp" "$1" || \
|
||||
"$mecleaner" $mfs $_r -t -O "$xbloc/a" -M "$_metmp" "$1" || \
|
||||
"$mecleaner" $mfs $_r -t -O "$_metmp" "$1" || "$me7updateparser" \
|
||||
-O "$_metmp" "$1" || extract_archive "$1" "$_7ztest" || return 0
|
||||
|
||||
@@ -387,9 +387,9 @@ vfile()
|
||||
elif [ "$nuke" = "nuke" ]; then
|
||||
x_ "$cbfstool" "$rom" remove -n "$cbfsname"
|
||||
elif [ "$_t" = "stage" ]; then # the only stage we handle is refcode
|
||||
x_ rm -f "$xbmklocal/refcode"
|
||||
x_ "$rmodtool" -i "$_dest" -o "$xbmklocal/refcode"
|
||||
x_ "$cbfstool" "$rom" add-stage -f "$xbmklocal/refcode" \
|
||||
x_ rm -f "$xbloc/refcode"
|
||||
x_ "$rmodtool" -i "$_dest" -o "$xbloc/refcode"
|
||||
x_ "$cbfstool" "$rom" add-stage -f "$xbloc/refcode" \
|
||||
-n "$cbfsname" -t stage
|
||||
else
|
||||
x_ "$cbfstool" "$rom" add -f "$_dest" -n "$cbfsname" \
|
||||
|
||||
Reference in New Issue
Block a user