1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # ========================================================================
|
---|
4 | #
|
---|
5 | # *
|
---|
6 | # * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
7 | # * Software. It is distributed to you in the hope that it can be a useful
|
---|
8 | # * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
9 | # * It is distributed WITHOUT ANY WARRANTY.
|
---|
10 | # *
|
---|
11 | # * Permission to use, copy, modify and distribute this software and its
|
---|
12 | # * documentation for any purpose is hereby granted without fee,
|
---|
13 | # * provided that the above copyright notice appear in all copies and
|
---|
14 | # * that both that copyright notice and this permission notice appear
|
---|
15 | # * in supporting documentation. It is provided "as is" without express
|
---|
16 | # * or implied warranty.
|
---|
17 | # *
|
---|
18 | #
|
---|
19 | #
|
---|
20 | # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
|
---|
21 | #
|
---|
22 | # Copyright: MAGIC Software Development, 2000-2004
|
---|
23 | #
|
---|
24 | #
|
---|
25 | # ========================================================================
|
---|
26 |
|
---|
27 | umask 0002
|
---|
28 |
|
---|
29 | ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/{ccdata,cacodata,amc,daqlog}/*
|
---|
30 |
|
---|
31 | subsysfiles=`find /magic/datacenter/fromtape/ccdata/ -name '*.*'`
|
---|
32 | subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/daqlog/ -name '*.*'`)
|
---|
33 | subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/cacodata/ -name '*.*'`)
|
---|
34 | subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/amc/ -name '*.*'`)
|
---|
35 |
|
---|
36 | for subsysfile in ${subsysfiles[@]}
|
---|
37 | do
|
---|
38 | # echo "file: "$subsysfile
|
---|
39 | newsubsysfile=`echo $subsysfile | sed -e 's/datacenter\/fromtape/subsystemdata/g' -e 's/daqlog/daq__/g' -e 's/ccdata/cc/g' -e 's/cacodata/caco/g' -e 's/_/\//1' -e 's/_/\//1' -e 's/\/\///g'`
|
---|
40 | # echo "new file: "$newsubsysfile
|
---|
41 | newdir=`dirname $newsubsysfile`
|
---|
42 | # echo "newdir: "$newdir
|
---|
43 | if [ ! -d $newdir ]
|
---|
44 | then
|
---|
45 | echo "make dir "$newdir
|
---|
46 | mkdir -p $newdir
|
---|
47 | fi
|
---|
48 |
|
---|
49 | mv -v $subsysfile $newsubsysfile
|
---|
50 |
|
---|
51 | done
|
---|
52 |
|
---|