Index: trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7232)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7233)
@@ -41,13 +41,5 @@
 
 scriptlogpath=$logpath/run/checkfilesavail/`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/checkfilesforsequenceavail-$datetime.log
@@ -55,13 +47,5 @@
 date >> $scriptlog 2>&1
 
-if [ ! -d $getstatuslogpath ]
-then
-  mkdir -pv $getstatuslogpath  >> $scriptlog 2>&1 
-  if [ ! -d $getstatuslogpath ]
-  then 
-     echo "could not make getstatuslogpath "$getstatuslogpath  >> $scriptlog 2>&1
-     exit
-  fi
-fi
+makedir $getstatuslogpath >> $scriptlog 2>&1
 
 cd $mars
@@ -100,13 +84,6 @@
    outpath=$logpath/checkfileavail/$no
    echo "outpath: "$outpath  >> $scriptlog 2>&1 
-   if [ ! -d $outpath ]
-   then
-     mkdir -pv $outpath  >> $scriptlog 2>&1 
-     if [ ! -d $outpath ]
-     then 
-        echo "could not make outpath $outpath -> continue "  >> $scriptlog 2>&1 
-        continue
-     fi
-   fi
+   makedir $outpath  >> $scriptlog 2>&1 
+
    check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequence\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
 
@@ -114,13 +91,6 @@
       1)   echo "check1=$check1 -> everthing ok -> setting status..." >> $scriptlog 2>&1 
            setstatuslogpath=$logpath/setstatus/checkfileavail/$no
-           if [ ! -d $setstatuslogpath ]
-           then
-             mkdir -pv $setstatuslogpath  >> $scriptlog 2>&1 
-             if [ ! -d $setstatuslogpath ]
-             then
-                echo "could not make setstatuslogpath "$setstatuslogpath  >> $scriptlog 2>&1 
-                continue
-             fi
-           fi
+           makedir $setstatuslogpath  >> $scriptlog 2>&1 
+
            check2=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
     	   case $check2 in
