-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathcronscript.sh
More file actions
executable file
·21 lines (18 loc) · 860 Bytes
/
cronscript.sh
File metadata and controls
executable file
·21 lines (18 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
cd /mnt/sites/supporting-python-3
git fetch
if [ $(git rev-parse HEAD) == $(git rev-parse @{u}) ]; then
echo "NOT UPDATED"
exit 0
fi
echo "UPDATED: REBUILD!"
git pull
make html
make pdf-all
cp -r build/html/* /var/www/python3porting.com
TODAY=`date +%Y%m%d`
cp build/*${TODAY}.pdf /var/www/python3porting.com/pdfs
rm /var/www/python3porting.com/pdfs/SupportingPython3*latest.pdf
ln -s /var/www/python3porting.com/pdfs/SupportingPython3-phone-1.0-${TODAY}.pdf /var/www/python3porting.com/pdfs/SupportingPython3-phone-1.0-latest.pdf
ln -s /var/www/python3porting.com/pdfs/SupportingPython3-screen-1.0-${TODAY}.pdf /var/www/python3porting.com/pdfs/SupportingPython3-screen-1.0-latest.pdf
ln -s /var/www/python3porting.com/pdfs/SupportingPython3-tablet-1.0-${TODAY}.pdf /var/www/python3porting.com/pdfs/SupportingPython3-tablet-1.0-latest.pdf