forked from CMSROMA/Utilities
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrsyncFitter.sh
executable file
·55 lines (50 loc) · 954 Bytes
/
rsyncFitter.sh
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
52
53
54
55
#!/bin/bash
usage(){
echo "Usage: `basename $0` <-l|-t|-m|-d>"
echo " -m: MC to tmp"
echo " -d: data to tmp"
echo " -t: MC and data to tmp"
echo " -l: tmp to local"
}
case $# in
0)
usage
exit 1
;;
1)
;;
*)
usage
exit 1
;;
esac
EXCLUDE="--exclude=*.root"
while getopts htlmd option
do
case $option in
h)
usage
exit 0
;;
m)
rsync -ahuvz test/MC/ lxplus:/tmp/shervin/test/MC/
;;
t)
rsync -ahuvz test/MC/ lxplus:/tmp/shervin/test/MC/
rsync -ahuvz test/data/ lxplus:/tmp/shervin/test/data/
;;
d)
rsync -ahuvz test/data/ lxplus:/tmp/shervin/test/data/
;;
l)
rsync -ahuvz lxplus309:/tmp/shervin/test/MC/ test/MC/
;;
# rsync -ahuvz $EXCLUDE lxplus:~/scratch1/analyzer/ /home/CMS/results/analyzer/
# ;;
*)
echo "[ERROR] Wrong parameter" >> /dev/stderr
usage >> /dev/stderr
exit 1
;;
esac
done