From: Silvio Rhatto Date: Thu, 3 Nov 2016 17:37:10 +0000 (-0200) Subject: Adds zsync X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4157aae3ea0f4b4af7d944944d9d96c3fb310e0b;p=scripts.git Adds zsync --- diff --git a/zsync b/zsync new file mode 100755 index 0000000..007e548 --- /dev/null +++ b/zsync @@ -0,0 +1,24 @@ +#!/bin/bash +# +# ZTD extension to commit, push and fetch a project. +# + +# Parameters +PROJECT="$1" + +# Try to get there +if [ ! -z "$PROJECT" ]; then + cd $PROJECT +fi + +# Sync +if [ -d '.git' ]; then + if which updates 2> /dev/null; then + updates + else + git commit -a -m "Updates $PROJECT" + git push + fi + + git fetch --all +fi