Index: trunk/MagicSoft/Mars/datacenter/scripts/copyscript
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/copyscript	(revision 7213)
+++ trunk/MagicSoft/Mars/datacenter/scripts/copyscript	(revision 7233)
@@ -70,13 +70,5 @@
 
 scriptlogpath=$logpath/run/copyscript/`date +%Y/%m/%d`
-if [ ! -d $scriptlogpath ]
-then
-  mkdir -pv $scriptlogpath 
-  if [ ! -d $scriptlogpath ]
-  then 
-     echo "could not make scriptlogpath "$scriptlogpath 
-     exit
-  fi
-fi
+makedir $scriptlogpath
 
 scriptlog=$scriptlogpath/copyscript-$datetime.log
@@ -149,13 +141,5 @@
    copylogpath=$logpath/copyscript/$date2
    echo "copylogpath: "$copylogpath >> $scriptlog 2>&1
-   if [ ! -d $copylogpath ]
-   then
-     mkdir -pv $copylogpath >> $scriptlog 2>&1
-     if [ ! -d $copylogpath ]
-     then
-        echo "could not make copylogpath $copylogpath -> continue " >> $scriptlog 2>&1
-        continue
-     fi
-   fi
+   makedir $copylogpath >> $scriptlog 2>&1
    
    #loop over all files in the directories for this date
@@ -172,15 +156,6 @@
          echo "file (new path): "$newfile >> $scriptlog 2>&1 
          newpath=`dirname $newfile`
-#         echo "new path: "$newpath
          #make sure, that the needed directories are available
-         if [ ! -d $newpath ]
-         then
-            mkdir -pv $newpath >> $scriptlog 2>&1 
-            if [ ! -d $newpath ]
-            then 
-               echo "could not make path $newpath"  >> $scriptlog 2>&1 
-               continue
-            fi
-         fi
+         makedir $newpath >> $scriptlog 2>&1 
          
          #run macros if the file is a *.rbk or a *.run file to
