X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=update;h=205c7c6f21ab59737d825e73d302a3359dfc2338;hb=d38be90c1d67717c7113486414e65d8b2c8c4151;hp=199e16fb9767fd7e83ec2d49ca765a684682abd7;hpb=4e75cec98d5465438b81ade0036e2b6fc7ab59c8;p=git-scripts.git diff --git a/update b/update index 199e16f..205c7c6 100755 --- a/update +++ b/update @@ -5,14 +5,14 @@ origin="`git config --get --path remote.origin.url`" if [ -n "$origin" ]; then if [ -n "$current" ]; then - echo "UNKNOWN ERROR (both origin and current)" >&2 + echo "Config error (both origin and current)" >&2 exit 1 else - cd "$origin" || exit 1 + cd "$origin" && exec ./update fi elif [ -z "$current" ]; then - echo "UNKNOWN ERROR (neither origin nor current)" >&2 + echo "Wrong directory error (neither origin nor current)" >&2 exit 1 fi @@ -20,7 +20,7 @@ git pull --ff-only current master && web="`git config --get --path remote.web.url`" && if [ -n "$web" ]; then - git push web + git push web master fi && cd "$current" && exec git pull origin