File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # After every Git commit affecting web...
4+
5+ echo " Syncing 'linuxcourse' directory"
6+ echo
7+ rsync -arv --exclude=* ~ --progress linuxcourse ` grep lad ~ /.bashrc | grep -o " [a-z]\+@[0-9.]\+" ` :/home/vjtz/soubory.trapa.cz/htdocs/
8+ echo
9+
10+ # Copy also presentation and scripts and data (pack and Copy)
11+ if [ " $1 " == " all" ]; then
12+ # Copy presentation
13+ echo " Syncing presentation"
14+ echo
15+ rsync -av --progress presentation/linux_bash_metacentrum_course.pdf ` grep lad ~ /.bashrc | grep -o " [a-z]\+@[0-9.]\+" ` :/home/vjtz/soubory.trapa.cz/htdocs/linuxcourse/
16+ echo
17+ # Zip scripts and data
18+ echo " Archiving scripts and data"
19+ echo
20+ zip -9 -r scripts_data.zip scripts_data -x \* ~
21+ echo
22+ # Copy the ZIP archive
23+ echo " Syncing scripts and data"
24+ echo
25+ rsync -av --progress scripts_data.zip ` grep lad ~ /.bashrc | grep -o " [a-z]\+@[0-9.]\+" ` :/home/vjtz/soubory.trapa.cz/htdocs/linuxcourse/
26+ echo
27+ # Delete the local zip archive
28+ echo " Removing local archive"
29+ rm scripts_data.zip
30+ echo
31+ fi
32+
33+ echo " Done!"
34+
35+ exit
You can’t perform that action at this time.
0 commit comments