2019-03-18 09:12:02 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
REMOTES=(
|
|
|
|
"coreboot upstream https://github.com/coreboot/coreboot.git"
|
|
|
|
"edk2 upstream https://github.com/tianocore/edk2.git"
|
2019-09-26 15:07:53 -06:00
|
|
|
"edk2 mrchromebox https://github.com/MrChromebox/edk2.git"
|
2019-03-18 09:12:02 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-10-13 21:53:41 -06:00
|
|
|
git_remote() {
|
2019-03-18 09:12:02 -06:00
|
|
|
echo -e "\x1B[1m$1\x1B[0m"
|
2019-09-13 20:10:00 -06:00
|
|
|
pushd "$1" > /dev/null
|
2019-03-18 09:12:02 -06:00
|
|
|
if git remote | grep "^$2\$"
|
|
|
|
then
|
|
|
|
git remote set-url "$2" "$3"
|
|
|
|
else
|
|
|
|
git remote add "$2" "$3"
|
|
|
|
fi
|
|
|
|
git fetch "$2"
|
2019-09-13 20:10:00 -06:00
|
|
|
popd > /dev/null
|
2019-03-18 09:12:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
for remote in "${REMOTES[@]}"
|
|
|
|
do
|
2023-10-13 21:53:41 -06:00
|
|
|
git_remote "$remote"
|
2019-03-18 09:12:02 -06:00
|
|
|
done
|