diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-17 09:30:52 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-17 10:33:43 +0100 |
| commit | 69875b8e10fb1ae53c4f6aba38b4f604276d3f5b (patch) | |
| tree | 654e72aff10775a926a1707df0479463be790fa2 /include/env | |
| parent | 1722964f66562c690bfcc749674d08c2ad89badb (diff) | |
xbmk: general cleanup
note: mecleaner check removed in vendor.sh, because
it's already guaranteed to be fetched. the check will
never indicate failure, so we can just assume that
the me cleaner python script exists.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/env')
| -rw-r--r-- | include/env/get.sh | 30 | ||||
| -rw-r--r-- | include/env/init.sh | 6 |
2 files changed, 11 insertions, 25 deletions
diff --git a/include/env/get.sh b/include/env/get.sh index 0863615b..9cd88174 100644 --- a/include/env/get.sh +++ b/include/env/get.sh @@ -39,14 +39,12 @@ single_tree_fetch() x_ "$mk" -f $d done - clone_project + $if_single_tree \ + clone_project; : } clone_project() { - singletree "$project" || \ - return 0 - loc="src/$project" [ -d "$loc" ] && \ return 0 @@ -174,10 +172,8 @@ try_fetch_curl() try_$2 "$cached" "$@" || \ return 1 - [ -f "$5" ] && \ - if bad_checksum "$6" "$5" 2>/dev/null; then - x_ cp "$cached" "$5" - fi + [ -f "$5" ] && bad_checksum "$6" "$5" 2>/dev/null && \ + x_ cp "$cached" "$5" if [ ! -f "$cached" ]; then return 1 @@ -202,8 +198,7 @@ try_curl() ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" ( x_ curl --location --retry 3 -A "$ua" "$2" -o "$1" ) \ - || ( x_ wget --tries 3 -U "$ua" "$2" -O "$1" ) \ - || return 1; : + || ( x_ wget --tries 3 -U "$ua" "$2" -O "$1" ) || return 1; : } try_copy() @@ -230,15 +225,9 @@ try_git() x_ mv "$tmpgitcache" "$gitdest" fi - if git -C "$gitdest" show "$7" 1>/dev/null 2>/dev/null && \ - [ "$forcepull" != "y" ]; then - # don't try to pull the latest changes if the given target - # revision already exists locally. this saves a lot of time - # during release builds, and reduces the chance that we will - # interact with grub.git or gnulib.git overall during runtime - - return 0 - fi + git -C "$gitdest" show "$7" 1>/dev/null 2>/dev/null && \ + [ "$forcepull" != "y" ] && \ + return 0 # don't pull changes if target rev exists locally if [ "$XBMK_CACHE_MIRROR" = "y" ]; then ( x_ git -C "$gitdest" fetch ) || :; : @@ -250,9 +239,8 @@ try_git() bad_checksum() { - if e "$2" f missing; then + e "$2" f missing && \ return 0 - fi build_sbase csum="$(x_ "$sha512sum" "$2" | awk '{print $1}')" || \ diff --git a/include/env/init.sh b/include/env/init.sh index d17b5fb8..d04474e3 100644 --- a/include/env/init.sh +++ b/include/env/init.sh @@ -165,13 +165,11 @@ xbmk_parent_set_env() x_ chmod -w "$xbmklock" - xbmk_parent_set_export - xbmk_set_version + forx 'xbmk_%s' parent_set_export set_version remkdir "$xbtmp" "$xbtmp/xbmkpath" - xbmk_set_pyver - xbmk_set_mirror + forx 'xbmk_set_%s' pyver mirror } xbmk_parent_check_tmp() |
