Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Absolute path to the file containing the notes (inside an SSH-cloned repository)
- fileDIR=/home/juani/Documentos/journal/misc/
- FILENAME=notes.md
- ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && (cd $fileDIR && git pull) || echo 'Error, no hay conexion a internet, no se pudo pullear'
- cd $FILEDIR
- echo "* "$1" " >> $fileDIR$FILENAME
- ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && (cd $fileDIR && git add . && git commit -m "autoCommit" && git push) || echo 'Error, no hay conexion a internet, no se pudo pushear'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement