#! /bin/sh current="`git config --get --path remote.current.url`" origin="`git config --get --path remote.origin.url`" if [ -n "$origin" ]; then if [ -n "$current" ]; then echo "UNKNOWN ERROR (both origin and current)" >&2 exit 1 else cd "$origin" || exit 1 exec ./update fi elif [ -z "$current" ]; then echo "UNKNOWN ERROR (neither origin nor current)" >&2 exit 1 fi git pull --ff-only current master && web="`git config --get --path remote.web.url`" && if [ -n "$web" ]; then git push web master fi && cd "$current" && exec git pull origin