From 4157aae3ea0f4b4af7d944944d9d96c3fb310e0b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 3 Nov 2016 15:37:10 -0200 Subject: Adds zsync --- zsync | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 zsync (limited to '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 -- cgit v1.2.3