Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 08:59:27

0001 #!/bin/bash
0002 # - KLUGE: the `sed -i ... $klugedFile` commands work around
0003 #   Gaudi `listcomponent`'s preference of "installed" libraries
0004 #   (maybe `$LD_LIBRARY_PATH`) over those we have just built; the regexp
0005 #   forces `listcomponents` to use the newly built library in the `pwd`; since
0006 #   this will write unecessary `./` characters to the output `*.components` file,
0007 #   a second regexp is used to remove them
0008 for klugedFile in `find build -name "build.make" -print | grep -E 'Jug.*Plugins\.dir'`; do
0009   echo "KLUGE $klugedFile"
0010   #mv $klugedFile{.bak,} # restore backups (uncomment this if you are brave enough to edit this script)
0011   components=$(grep listcomponents $klugedFile | sed 's/^.*--output //g' | awk '{print $1}') # components file
0012   echo "COMPONENTS $components"
0013   sed -i.bak '/listcomponents/{s/ libJug/ .\/libJug/;}' $klugedFile # make definite relative path
0014   sed -i     's/listcomponents.*$/& \&\& sed -i "s\/\\\.\\\/\/\/g" '${components}'/g' $klugedFile # remove ./ from $components
0015   #echo "DIFF:"; diff $klugedFile{.bak,} # show what the kluge did
0016 done