feat(git):
This commit is contained in:
parent
89f23a49b2
commit
ddf58e2786
2 changed files with 37 additions and 0 deletions
6
ayo.sh
6
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
|
||||
;;
|
||||
|
|
31
git.sh
Executable file
31
git.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue