From ddf58e2786c3dfb0db7bd85a7a1f3e383614103e Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 23 Jun 2025 11:29:19 +0200 Subject: [PATCH] feat(git): --- ayo.sh | 6 ++++++ git.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 git.sh diff --git a/ayo.sh b/ayo.sh index b8c730e..0a19146 100755 --- a/ayo.sh +++ b/ayo.sh @@ -9,9 +9,15 @@ case $1 in ns) # js - journal sync . ${HOME}/Projects/scripts/notes.sh sync $2 $3 $4 $5 $6 $7 $8 $9 ;; + gs) # js - journal sync + . ${HOME}/Projects/scripts/git.sh stat $2 $3 $4 $5 $6 $7 $8 $9 + ;; ## SCRIPTS + g | git) + . ${HOME}/Projects/scripts/git.sh $2 $3 $4 $5 $6 $7 $8 $9 + ;; n | notes) . ${HOME}/Projects/scripts/notes.sh $2 $3 $4 $5 $6 $7 $8 $9 ;; diff --git a/git.sh b/git.sh new file mode 100755 index 0000000..ec630ce --- /dev/null +++ b/git.sh @@ -0,0 +1,31 @@ +#! /usr/bin/bash + +# git tools + +# Load config +. ${HOME}/ayo.conf + +command=$1 +journal_dir="${notes_dir}/Journal" +month_dir=$(date +"%m %b") + +getopts "t" typora; #check if -t flag is given + +if [ "$1" = "stat" ]; then + { + git add . + git status + } || { + # Report; TODO: write log + echo ">>> Stat failed" + } +elif [ "$1" = "commit" ]; then + { + git commit -m "$2" + } || { + # Report; TODO: write log + echo ">>> Stat failed" + } +else + echo "git tools" +fi