]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ATO-96 - function to make a diff file between *.C files - ignoring prefix of OCDB...
authormivanov <marian.ivanov@cern.ch>
Sat, 6 Dec 2014 09:46:00 +0000 (10:46 +0100)
committermivanov <marian.ivanov@cern.ch>
Sat, 6 Dec 2014 09:46:00 +0000 (10:46 +0100)
PWGPP/CalibMacros/AliOCDBtoolkit.sh

index ce077ed990fafb46369ea58e0444d44e49a27504..f76fd880e387a66622956d805ae6d9b7e94db643 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/bash
 #
 # Shell script to compare content of the OCDB entries.
+# Usage:
+# 1) source functios 
+# source $ALICE_ROOT/PWGPP/CalibMacros/AliOCDBtoolkit.sh
 #
 # ocdbMakeTable() 
 #       Usage: bash $inputFile $flag $outputFile
@@ -10,6 +13,9 @@
 #       Usage: bash $inputFile1 $inputFile2 $object_name $dump_type [XML/MI] $outfile
 # Example usage:  see example functions below
 
+# Origin marian.ivanov@cern.ch,  j.wagner@cern.ch
+
+
 ocdbMakeTable(){
 #
 # create a text file with the OCDB setupt descriptors#
@@ -199,3 +205,17 @@ developerTest(){
     example2
     example3
 }
+
+
+diffConfig(){
+    #
+    # diff configuaration files ignoring trivial differences between the OCDBprefixes 
+    #
+    file1=$1
+    file2=$2
+
+    cat $file1 | sed s_"alien://folder="_"ocdbprefix"_g | sed s_"alien://Folder="_"ocdbprefix"_g | sed s_"local://\${ALICE\_OCDB}"_"ocdbprefix"_g  >${file1}_ocdbstripped
+    cat $file2 | sed s_"alien://folder="_"ocdbprefix"_g | sed s_"alien://Folder="_"ocdbprefix"_g | sed s_"local://\${ALICE\_OCDB}"_"ocdbprefix"_g   >${file2}_ocdbstripped
+    diff  ${file1}_ocdbstripped  ${file2}_ocdbstripped  > ${file1}_ocdbstrippeddiff
+
+}
\ No newline at end of file