ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/fixFile.sh
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/fixFile.sh (file contents):
Revision 1.1 by paus, Tue Feb 28 11:54:35 2012 UTC vs.
Revision 1.2 by paus, Fri Jan 18 22:55:24 2013 UTC

# Line 36 | Line 36 | then
36      exit 0
37    else
38      echo " File is really broken. Remove it."
39 <    rm -f  $dir/$file
39 >    remove --exe --catalog $dir/$file
40    fi
41   else
42    echo ""
# Line 66 | Line 66 | then
66      echo " ERRO - File is broken again. Removing it."
67      echo "        $dir/$file"
68      echo ""
69 <    rm -f  $dir/$file
69 >    remove --exe --catalog $dir/$file
70    fi
71   else
72    echo ""
# Line 91 | Line 91 | else
91        echo ""
92        echo " GOOD - Recovery completed successfully from CERN."
93        echo "        $dir/$file"
94 <      # try to recover Tier-2 from CERN
95 <      echo " Start recovery on Tier-2."
96 <      downloadFile.sh $CERN_LOC/$cfg/$version/$dset/$file $MIT_LOC/$cfg/$version/$dset/$file \
97 <                      >& /dev/null
98 <      echo "        -> Download (to Tier-2) status: $?"
99 <      test=`catalogFile.sh $MIT_LOC/$cfg/$version/$dset $file 2> /dev/null | grep XX-CATALOG-XX`
100 <      if [ "$test" != "" ]
94 >      # try to recover Tier-2 from CERN if that is required
95 >      if [ "$MIT_LOC/$cfg/$version/$dset/$file" != "$dir/$file" ]
96        then
97 <        echo ""
98 <        echo " GOOD - Recovery on Tier-2 completed successfully from CERN."
99 <        echo "        $MIT_LOC/$cfg/$version/$dset/$file"
100 <        echo ""
101 <      else
102 <        echo " ERRO - File on tier-2 is still broken. Stop process"
103 <        echo "        $MIT_LOC/$cfg/$version/$dset/$file"
104 <        echo ""
105 <      fi    
97 >        echo " Start recovery on Tier-2."
98 >        downloadFile.sh $CERN_LOC/$cfg/$version/$dset/$file $MIT_LOC/$cfg/$version/$dset/$file \
99 >                        >& /dev/null
100 >        echo "        -> Download (to Tier-2) status: $?"
101 >        test=`catalogFile.sh $MIT_LOC/$cfg/$version/$dset $file 2> /dev/null | grep XX-CATALOG-XX`
102 >        if [ "$test" != "" ]
103 >        then
104 >          echo ""
105 >          echo " GOOD - Recovery on Tier-2 completed successfully from CERN."
106 >          echo "        $MIT_LOC/$cfg/$version/$dset/$file"
107 >          echo ""
108 >        else
109 >          echo " ERRO - File on tier-2 is still broken. Stop process"
110 >          echo "        $MIT_LOC/$cfg/$version/$dset/$file"
111 >          echo ""
112 >        fi    
113 >      fi
114      else
115        echo " ERRO - File is broken again. Removing it."
116        echo "        $dir/$file"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines