ec8888fe363bb46c578867067059cbddd65519c1
[matches/honours.git] / update.sh
1 #!/bin/bash
2
3 # Script to update all the honours stuff on a regular basis
4
5 # Need to cd to the directory, otherwise nothing will work
6 directory="/home/sam/Documents/University/honours/"
7 cd "$directory" 
8
9 # Need to do this too. Apparently
10 ##eval `ssh-agent -s`
11
12 git add update.sh
13 git add papers
14 git add research
15 git add thesis/proposal/*.tex
16 git add thesis/proposal/*.pdf
17 git add thesis/proposal/*.bib
18 git add thesis/*.tex
19 git add thesis/*.pdf
20 git add thesis/*.bib
21 git add course/semester2
22
23
24 git commit -m "Automatic commit at $(date)"
25 if [ "$?" == 0 ]; then
26         echo "Commit at $(date)" >> commits.log
27         git push git.ucc 2>&1 >> commits.log
28 fi
29
30 #kill $SSH_AGENT_PID

UCC git Repository :: git.ucc.asn.au