-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsync-files
executable file
·51 lines (40 loc) · 1.12 KB
/
sync-files
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
V="-v"
## Script to update web resources. Usually invoked as ./sync-files -v
## Needs to be run from the dir containing the COMP101 notes
## Things to update
YEAR=2016
COMP101HOME=.
USR=srp
while getopts qnu: c
do
case $c in
v) V=${V}v;;
q) V=-q;;
n) V=${V}n;;
u) USR=$OPTARG;;
esac
done
if [ X$V = X-q ]
then
:
else
echo `basename $0`
fi
##### update course material on waldorf
if [ X$V = X-q ]
then
:
else
echo "Updating files for $YEAR on waldorf"
fi
## Use sonofis7 so can update from outside School
for file in all-introlabs.pdf intro0.pdf intro1.pdf intro2.pdf intro3.pdf intro4.pdf introappendix.pdf intro0-large.pdf intro1-large.pdf intro2-large.pdf intro3-large.pdf intro4-large.pdf
do
echo $file
done | rsync -a $V -e 'ssh -p1001' --files-from=- . [email protected]:/www/virtualHosts/studentnet/ugt/$YEAR/COMP10120/labscripts
for file in mutt-template Advent.z5 quake3.tar.gz mrnoodle.tar.gz BlackboardIntro.pdf
do
echo $file
done | rsync -a $V -e 'ssh -p1001' --files-from=- files [email protected]:/www/virtualHosts/studentnet/ugt/$YEAR/COMP10120/files/
exit