3 # Script to update all the honours stuff on a regular basis
5 # Need to cd to the directory, otherwise nothing will work
6 directory="/home/sam/Documents/University/honours/"
9 # Need to do this too. Apparently
11 eval $(ssh-agent) 2>/dev/null
12 ssh-add /home/sam/.ssh/honours 2>/dev/null
17 $git add thesis/proposal/*.tex
18 $git add thesis/proposal/*.pdf
19 $git add thesis/proposal/*.bib
23 $git add course/semester2
25 #I've cracked it (derp)!
26 fortune="/usr/games/fortune"
27 message=$(echo "Automatic commit $(date)"; $fortune; echo "")
28 $git commit -m "$message"
29 if [ "$?" == 0 ]; then
30 echo "Commit at $(date)" >> commits.log
31 $git push git.ucc 2>&1 >> commits.log
34 kill -9 $SSH_AGENT_PID