Fix use of directories in scripts/remotes

This commit is contained in:
Jeremy Soller
2019-09-13 20:10:00 -06:00
parent 800fce02ce
commit a94f21e888

View File

@ -10,7 +10,7 @@ set -e
function git_remote { function git_remote {
echo -e "\x1B[1m$1\x1B[0m" echo -e "\x1B[1m$1\x1B[0m"
cd "$1" pushd "$1" > /dev/null
if git remote | grep "^$2\$" if git remote | grep "^$2\$"
then then
git remote set-url "$2" "$3" git remote set-url "$2" "$3"
@ -18,7 +18,7 @@ function git_remote {
git remote add "$2" "$3" git remote add "$2" "$3"
fi fi
git fetch "$2" git fetch "$2"
cd .. popd > /dev/null
} }
for remote in "${REMOTES[@]}" for remote in "${REMOTES[@]}"