Skip to content
yvancouver edited this page May 2, 2014 · 10 revisions

Started the 2Mai2014

From this create an auto push/pull script

#!/bin/bash
 
#### CHANGE THE FOLLOWING 2 LINES TO MATCH YOUR ENVIRONMENT ###
NV_NOTES_PATH=~/Library/Application Support/Notational Data
GIT_PATH=/usr/local/bin
#### DO NOT CHANGE ANYTHING BELOW THIS LINE ####
 
STAT_FILE="YOU HAVE NEW FILES TO SYNC.txt"
cd "$NV_NOTES_PATH"
$GIT_PATH/git pull
$GIT_PATH/git push
 
GIT_STATUS=`$GIT_PATH/git status`
 
if [[ "$GIT_STATUS" =~ "nothing to commit" ]]
then
  if [ -e "$STAT_FILE" ]
  then
    rm "$STAT_FILE"
  fi
else
  echo "$GIT_STATUS" > "$STAT_FILE"
fi

to

#!/bin/bash
 
#### CHANGE THE FOLLOWING 2 LINES TO MATCH YOUR ENVIRONMENT ###
NV_NOTES_PATH=~Home/workspace/Workflow.wiki/
GIT_PATH=/usr/bin/
#### DO NOT CHANGE ANYTHING BELOW THIS LINE ####
 
STAT_FILE="YOU HAVE NEW FILES TO SYNC.txt"
cd "$NV_NOTES_PATH"
$GIT_PATH/git pull
$GIT_PATH/git push
 
GIT_STATUS=`$GIT_PATH/git status`
 
if [[ "$GIT_STATUS" =~ "nothing to commit" ]]
then
  if [ -e "$STAT_FILE" ]
  then
    rm "$STAT_FILE"
  fi
else
  echo "$GIT_STATUS" > "$STAT_FILE"
fi

I needed to change the .gitignore file , comment out *.txt and Notes & Settings. Furthermore the default file in nVAllGit was txt instead of md. Change that too

Clone this wiki locally