branches="master ${1:+$@}"
if [ -n "$origin" ]; then
- if [ -n "$current" ]; then
- echo "Config error (both origin and current)" >&2
- exit 1
- else
- cd "$origin"
- exec ./update-remotes "$@"
- fi
+ if [ -n "$current" ]; then
+ echo "Config error (both origin and current)" >&2
+ exit 1
+ else
+ cd "$origin"
+ exec ./update-remotes "$@"
+ fi
elif [ -z "$current" ]; then
- echo "Wrong directory error (neither origin nor current)" >&2
- exit 1
+ echo "Wrong directory error (neither origin nor current)" >&2
+ exit 1
fi
git fetch current
web="`git config --get --path remote.web.url`"
if [ -n "$web" ]; then
- git push --force web $branches
+ git push --force web $branches
fi
cd "$current"