aboutsummaryrefslogtreecommitdiff
path: root/done
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-05-14 13:58:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-05-14 13:58:28 -0300
commit3c07f63390526c65e569648f2b3bc42465f9e135 (patch)
treed774107729d7823aa648ef16ddb6a0d5bb661771 /done
parentfec935a411d77e40957e6bf08ea62d001413d12c (diff)
downloadscripts-3c07f63390526c65e569648f2b3bc42465f9e135.tar.gz
scripts-3c07f63390526c65e569648f2b3bc42465f9e135.tar.bz2
Replace 'ztd' script by 'status' and 'done'
Diffstat (limited to 'done')
-rwxr-xr-xdone24
1 files changed, 24 insertions, 0 deletions
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