get.sh: Always update git remotes

Right now, if cache/clone/PROJECT/ already exists,
the logic for pulling new changes doesn't execute,
and neither does the logic for updating remotes.

This is bad when updating revisions, because then
manual updating is required, defeating the purpose
of xbmk's own automation in this regard.

Fix it by only checking the cached download on files,
not Git repositories; the try_git function itself will
already perform this check, before updating remotes
and pulling in new commits from upstream.

The updating only happens when a given target directory
doesn't exist, e.g. src/flashprog/ or src/grub/default/,
so this won't slow down release builds for example.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-22 12:43:34 +01:00
parent 419733d307
commit 0216a3104a
+2 -1
View File
@@ -104,7 +104,8 @@ try_file()
echk="d" && [ "$2" != "git" ] && echk="f" && \
bad_checksum "$6" "$cached" 2>/dev/null && x_ rm -f "$cached"
eval "[ -$echk \"$cached\" ] || try_$2 \"\$cached\" \"\$@\" || return 1"
evalchk="[ -$echk \"$cached\" ] || " && [ "$2" = "git" ] && evalchk=""
eval "${evalchk}try_$2 \"\$cached\" \"\$@\" || return 1"
[ "$2" != "git" ] && [ -f "$5" ] && \
bad_checksum "$6" "$5" 2>/dev/null && x_ cp "$cached" "$5"
eval "[ -$echk \"$cached\" ] || return 1"