Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7478)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7479)
@@ -22,4 +22,8 @@
    * datacenter/scripts/sourcefile: 
      - implemented two new functions: getdolist, finish
+     - implemented usage of function finish in other functions
+
+   * datacenter/scripts/movingrawfiles: 
+     - implemented zipping of rawfiles
 
    * datacenter/scripts/buildsequenceentries, checkfilesforsequenceavail,
Index: /trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles	(revision 7478)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles	(revision 7479)
@@ -44,13 +44,21 @@
 # workaround for rawfiles with wrong timing
 #  newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`
-  newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
-  newdir=`dirname $newrawfile`
-  if [ ! -d $newdir ]
-  then
-    echo "make dir "$newdir
-    mkdir -p $newdir
-  fi
+   newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
+   newdir=`dirname $newrawfile`
+   if [ ! -d $newdir ]
+   then
+     mkdir -pv $newdir 
+     if [ ! -d $newdir ]
+     then 
+        echo "could not make dir "$newdir
+        exit
+     fi
+   fi
 
-  mv -v $rawfile $newrawfile
+   if gzip -1c $rawfile > $newrawfile.gz
+   then 
+      rm -v $newrawfile
+      rm -v $rawfile
+   fi
 done
 
Index: /trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7478)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7479)
@@ -50,4 +50,12 @@
 
 
+function finish()
+{
+   rm -v $todofile
+   rm -v $lockfile
+   date 
+   exit
+}
+
 function makedir()
 {
@@ -58,15 +66,7 @@
      then 
         echo "could not make dir "$@
-        exit
+        finish
      fi
    fi
-}
-
-function finish()
-{
-   rm -v $todofile
-   rm -v $lockfile
-   date 
-   exit
 }
 
