diff --git a/ayo.sh b/ayo.sh index 0a19146..5481f0d 100755 --- a/ayo.sh +++ b/ayo.sh @@ -12,6 +12,12 @@ case $1 in gs) # js - journal sync . ${HOME}/Projects/scripts/git.sh stat $2 $3 $4 $5 $6 $7 $8 $9 ;; + gc) # js - journal sync + . ${HOME}/Projects/scripts/git.sh commit $2 $3 $4 $5 $6 $7 $8 $9 + ;; + gp) # js - journal sync + . ${HOME}/Projects/scripts/git.sh push $2 $3 $4 $5 $6 $7 $8 $9 + ;; ## SCRIPTS diff --git a/git.sh b/git.sh index ec630ce..90fbc74 100755 --- a/git.sh +++ b/git.sh @@ -21,10 +21,19 @@ if [ "$1" = "stat" ]; then } elif [ "$1" = "commit" ]; then { + git add . + git status git commit -m "$2" } || { # Report; TODO: write log - echo ">>> Stat failed" + echo ">>> Commit failed" + } +elif [ "$1" = "push" ]; then + { + git push + } || { + # Report; TODO: write log + echo ">>> Push failed" } else echo "git tools"