X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=update.sh;h=a4587a85da8be06c92dfe89693e48abd0f56ebc6;hb=1ed81a35c80c1f0aad3d1296d15603d89d6242be;hp=035b52e793a1e1676a7bd37d5dfc628cdce95d55;hpb=a053ff3353928c281359d1271d261fcf34c09331;p=matches%2Fhonours.git diff --git a/update.sh b/update.sh index 035b52e7..a4587a85 100755 --- a/update.sh +++ b/update.sh @@ -2,11 +2,14 @@ # Script to update all the honours stuff on a regular basis -# I am testing the script by adding this comment here. Hopefully in 2 minutes time it will be committed. +# Need to cd to the directory, otherwise nothing will work +directory="/home/sam/Documents/University/honours/" +cd "$directory" -# TEST to make sure cron actually works -echo "It worked" >> test.cron +# Need to do this too. Apparently +eval `ssh-agent -s` +echo "Committing at $(date)" >> commits.log git add update.sh git add papers git add research @@ -18,7 +21,10 @@ git add thesis/*.pdf git add thesis/*.bib git add course/semester2 + git commit -m "Automatic commit at $(date)" if [ "$?" == 0 ]; then git push git.ucc fi + +kill $SSH_AGENT_PID