From 3c07f63390526c65e569648f2b3bc42465f9e135 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 14 May 2017 13:58:28 -0300 Subject: Replace 'ztd' script by 'status' and 'done' --- done | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 done (limited to 'done') diff --git a/done b/done new file mode 100755 index 0000000..6e95bbd --- /dev/null +++ b/done @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Submit updates to a project. +# + +# Parameters +PROJECT="$1" + +# Try to get there +if [ ! -z "$PROJECT" ]; then + cd $PROJECT &> /dev/null || exit 1 +fi + +# Sync +if git status &> /dev/null; then + if which updates > /dev/null; then + updates + else + git commit -a -m "Updates $PROJECT" + git push + fi + + git fetch --all +fi -- cgit v1.2.3