From 11f79fe74fba81d929129a8e3e0277a5480afd15 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 4 Oct 2017 00:06:31 +0200 Subject: [PATCH] autopush by david@ghost --- myzsh.sh | 10 ++++++---- plugins/david.zsh | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/myzsh.sh b/myzsh.sh index 609a223..d3612f3 100644 --- a/myzsh.sh +++ b/myzsh.sh @@ -19,10 +19,12 @@ fi if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then echo -n "[myzsh]: local myzsh repo is dirty. commit and push changes? [y/n]" read choice - if [ -n $choice ] && [ $choice = "y" ]; then - git add **/*[^lastrun] - git commit -am "autopush by $(whoami)@$(hostname)" - git push origin master + if [ $choice ]; then + if [ "$choice" = "y" ]; then + git add **/*[^lastrun] + git commit -am "autopush by $(whoami)@$(hostname)" + git push origin master + fi fi fi cd - > /dev/null diff --git a/plugins/david.zsh b/plugins/david.zsh index 87d3793..d863d16 100644 --- a/plugins/david.zsh +++ b/plugins/david.zsh @@ -235,3 +235,4 @@ fixtrackpoint() xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.75 } +