aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Hallett <thallett@gmail.com>2015-01-29 10:47:10 -0600
committerTimothy Hallett <thallett@gmail.com>2015-01-29 10:47:10 -0600
commit60eac0aa70673ff87e7cb6ef37b8b1dd6393701e (patch)
treee38d7292740d97a2c284da6fdc9e6fb5333541e1
parentd3b11a5656db5571da2404c5fc2dcb1a6afafb1d (diff)
downloadtask-git-60eac0aa70673ff87e7cb6ef37b8b1dd6393701e.tar.xz
task-git-60eac0aa70673ff87e7cb6ef37b8b1dd6393701e.zip
Fix for passing a filter as first arg, command as second arg
-rwxr-xr-xtask-git.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/task-git.sh b/task-git.sh
index 31ddee3..0e51278 100755
--- a/task-git.sh
+++ b/task-git.sh
@@ -63,6 +63,24 @@ do
esac
done
+# Check if we are passing a command for the second arg (filter for the first)
+if [ $PUSH -eq 0 ]
+then
+ for i in $2
+ do
+ case $i in
+ add|append|completed|delete|done|due|duplicate|edit|end|modify|prepend|rm|start|stop)
+ PUSH=1
+ echo "Push"
+ ;;
+ *)
+ ;;
+ esac
+ done
+fi
+
+
+
pushd $DATA_DIR > $LOGFILE
# Check if we have a place to push to
GIT_REMOTE=$(git remote -v | grep push | grep origin | awk '{print $2}')