File indexing completed on 2024-04-06 12:08:34
0001
0002
0003
0004
0005
0006
0007 if [[ ($
0008 subdirs="data interface plugins python"
0009 elif [[ ($
0010 subdirs="$1"
0011 else
0012 echo "No correct target specified, stopping!"
0013 echo "Possibilities are data, interface, plugins, python or all."
0014 exit 1
0015 fi
0016 echo "Command line argument is $1. Good."
0017
0018
0019 if [ ! -d "cmssw" ] ; then
0020 echo "No cmssw directory found! Check where you are running this script and make sure a cmssw subdir exists"
0021 exit 1
0022 fi
0023 echo "Found a cmssw directory. Good."
0024
0025
0026 for dirtype in $subdirs ; do
0027 echo "Copying files in $dirtype directories ..."
0028 for cmsswbaseidx in "$CMSSW_RELEASE_BASE" "." ; do
0029 export cmsswbase="${cmsswbaseidx}"
0030
0031 cd ${cmsswbase}
0032 ls src/*/*/${dirtype} | grep ${dirtype}":" > $OLDPWD/${dirtype}tmp.lst
0033 cd - > /dev/null
0034 awk -F : '{print $1}' ${dirtype}tmp.lst > ${dirtype}.lst
0035
0036 awk -F / '{print "mkdir -p cmssw/"$0}' ${dirtype}.lst > ${dirtype}mkdir.sh
0037 . ${dirtype}mkdir.sh
0038
0039 awk -F / '{print "cp -Rp "ENVIRON["cmsswbase"]"/"$0"/* cmssw/"$0}' ${dirtype}.lst > ${dirtype}copy.sh
0040 . ${dirtype}copy.sh
0041
0042 rm -f ${dirtype}tmp.lst ${dirtype}mkdir.sh ${dirtype}copy.sh ${dirtype}.lst
0043
0044 if [ ${dirtype} == "python" ] ; then
0045 cp -pLR ${cmsswbase}/python cmssw
0046 fi
0047 done
0048 done
0049 echo "done."