summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-22 12:22:07 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-22 12:22:07 +0100
commit419733d3073cbfc9f8f67e835b385b2b41e6f045 (patch)
treef0839a301d575350774c391391a6ddb5e1612e9b
parent231b320e63bb452208b3d01e5df6844ead4b76db (diff)
get.sh: re-generate remotes every time
that way, when a remote changes in config/, it will be updated automatically, without user intervention. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/get.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/get.sh b/include/get.sh
index ae2c5a35..08a561d9 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -143,8 +143,10 @@ try_git()
[ -d "$gitdest" ] || x_ mkdir -p "${gitdest%/*}"
[ -d "$gitdest" ] || x_ mv "$tmpgitcache" "$gitdest"
- ( x_ git -C "$gitdest" remote add main "$4" 2>/dev/null ) || :
- ( x_ git -C "$gitdest" remote add backup "$5" 2>/dev/null ) || :
+ ( x_ git -C "$gitdest" remote remove main ) || :
+ ( x_ git -C "$gitdest" remote remove backup ) || :
+ x_ git -C "$gitdest" remote add main "$4"
+ x_ git -C "$gitdest" remote add backup "$5"
( x_ git -C "$gitdest" fetch --all ) || :
( x_ git -C "$gitdest" pull --all ) || :; :
}