sync operations now check for last sync before running again. It's possible to set...
[bash-notes.git] / SOURCE / head.sh
index 9617ad3..890d711 100644 (file)
@@ -51,6 +51,8 @@ NOTESDIR=${BASEDIR}/notes
 USEGIT=true
 # Address of your remote repository
 GITREMOTE=${GITREMOTE:-""}
+# How long should we wait (in seconds) between sync on the git remote. Default 3600 (1 hour)
+GITSYNCDELAY=${GITSYNCDELAY:-3600}
 
 } # end set_defaults, do not change this line.
 
@@ -91,7 +93,7 @@ fi
 echo $PID > "$PIDFILE"
 
 # Export config to file
-function export_config() {
+export_config() {
        if [ -r ${RCFILE} ]; then
                echo "Backing up current '${RCFILE}'...."
                mv -f ${RCFILE} ${RCFILE}.$(date +%Y%m%d_%H%M)
@@ -112,7 +114,7 @@ function export_config() {
 
 # we should expand on this function to add a sample note and explain a little bit
 # how the program works.
-function firstrun() {
+firstrun() {
        [ -f $RCFILE ] && RC=$RCFILE || RC="none"
 
        clear
@@ -138,6 +140,9 @@ jq executable:              ${JQ}
                "version": "${VERSION}",
                "dbversion": "${DBVERSION}"
        },
+       "git": {
+               "lastpull": ""
+       },
        "notes": []
 }
 __EOL__