aboutsummaryrefslogtreecommitdiff
path: root/ztd
diff options
context:
space:
mode:
Diffstat (limited to 'ztd')
-rwxr-xr-xztd31
1 files changed, 31 insertions, 0 deletions
diff --git a/ztd b/ztd
new file mode 100755
index 0000000..29ea61f
--- /dev/null
+++ b/ztd
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# ZTD extension to commit, push and fetch a project.
+#
+
+# Parameters
+PROJECT="$1"
+
+# Try to get there
+if [ ! -z "$PROJECT" ]; then
+ cd $PROJECT
+else
+ cd
+ remind ~/.reminders | grep -v '^No reminders.$'
+ status
+ todo
+ postponed
+ exit
+fi
+
+# Sync
+if [ -d '.git' ]; then
+ if which updates > /dev/null; then
+ updates
+ else
+ git commit -a -m "Updates $PROJECT"
+ git push
+ fi
+
+ git fetch --all
+fi