Changeset 7944 for trunk/MagicSoft/Mars/datacenter/scripts/linkmc
- Timestamp:
- 08/25/06 22:09:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/linkmc
r7938 r7944 42 42 # 43 43 44 source `dirname $0`/sourcefile 45 printprocesslog "INFO starting $0" 44 46 program=linkmc 45 source `dirname $0`/sourcefile46 47 47 48 set -C 48 49 49 scriptlogpath=$runlogpath/$program 50 makedir $scriptlogpath 51 scriptlog=$scriptlogpath/linkmc`date +%F`.log 52 50 scriptlog=$runlogpath/$progam-`date +%F`.log 53 51 date >> $scriptlog 2>&1 54 52 55 53 # check if script is already running 56 lockfile=$lockpath/lock- mclinks.txt54 lockfile=$lockpath/lock-$program.txt 57 55 checklock >> $scriptlog 2>&1 58 56 … … 67 65 then 68 66 echo "file $next not found -> no start-runno -> exit" >> $scriptlog 2>&1 69 rm -v $lockfile >> $scriptlog 2>&170 exit67 printprocesslog "ERROR file $next (last runno) not found" 68 finish >> $scriptlog 2>&1 71 69 fi 72 70 … … 116 114 camfiles=`find $mccampath -type f | grep -v Cal_and_Ped` 117 115 116 printprocesslog "INFO linking new camerafiles starting with runno $runno" 118 117 for camfile in ${camfiles[@]} 119 118 do … … 123 122 continue 124 123 fi 124 printprocesslog "INFO linking $file" 125 125 file=`basename $camfile` #filename 126 126 no=`printf %08d $runno | cut -c 0-5` #first 5 digits of a 8digit runno -> for path … … 177 177 done 178 178 179 printprocesslog "INFO linking cal and ped files" 179 180 echo "linking cal and ped file" >> $scriptlog 2>&1 180 181 #get files … … 188 189 then 189 190 "too many files in the directory $mccampath/Cal_and_Ped -> exit" >> $scriptlog 2>&1 190 rm -v $lockfile >> $scriptlog 2>&1191 exit191 printprocesslog "ERROR too many ped and cal files found in $mccampath/Cal_and_Ped" 192 finish >> $scriptlog 2>&1 192 193 fi 193 194 … … 225 226 done 226 227 227 rm -v $lockfile >> $scriptlog 2>&1 228 229 set +C 230 231 date >> $scriptlog 2>&1 232 228 finish >> $scriptlog 2>&1 229
Note:
See TracChangeset
for help on using the changeset viewer.