initial setup of git functionality. The program can now initalize a local repo and...
[bash-notes.git] / SOURCE / head.sh
index d68d171..9617ad3 100644 (file)
@@ -17,7 +17,7 @@ PID=$$
 BASENAME=$( basename "$0" )
 NOW=$(date +%s)
 
-VERSION="0.3"
+VERSION="0.4git"
 DBVERSION=${VERSION}_${NOW}
 
 set_defaults() {
@@ -25,6 +25,8 @@ set_defaults() {
 JQ=${JQ:-/usr/bin/jq}
 EDITOR=${EDITOR:-/usr/bin/vim}
 TERMINAL=${TERMINAL:-/usr/bin/alacritty}
+# Git binary only used if $USEGIT is true - See below
+GIT=${GIT:-/usr/bin/git}
 # add options for your terminal. Remember to add the last option to execute
 # your editor program, otherwise the script will fail.
 # see example in the addnote function
@@ -43,6 +45,13 @@ DB=${BASEDIR}/db.json
 # directory containing the actual notes
 NOTESDIR=${BASEDIR}/notes
 
+### GIT SUPPORT
+
+# If you want to store your notes in a git repository set this to true
+USEGIT=true
+# Address of your remote repository
+GITREMOTE=${GITREMOTE:-""}
+
 } # end set_defaults, do not change this line.
 
 set_defaults
@@ -118,6 +127,7 @@ terminal:           ${TERMINAL}
 jq executable:         ${JQ}
 "
 
+       echo "Now I'll create the needed files and directories."
        read -r -p "Do you wish to continue? (y/N) " ANSWER
        case $ANSWER in
                y|Y )