X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=update;h=fd10a24b725bd744ab58db2f5282a70e05641b2e;hb=c0680b259d2ca7adfa83085358adc0b0f7b760c0;hp=34ed844ff2ed728dc09439028471622a11acd215;hpb=06a35bd51fb649e78aad470e7e84d449559158d8;p=git-scripts.git diff --git a/update b/update index 34ed844..fd10a24 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,8 +20,7 @@ git pull --ff-only current master && web="`git config --get --path remote.web.url`" && if [ -n "$web" ]; then - git push web && - cd "$web" && git branch -dr current/master && git update-server-info + git push web fi && cd "$current" && exec git pull origin