Skip to content

Commit

Permalink
Merge pull request #1478 from alja/CMSSW_7_0_X
Browse files Browse the repository at this point in the history
Fireworks -- 7_0_X remove obsolete version.txt file in Fireworks/Core
  • Loading branch information
ktf committed Nov 16, 2013
2 parents 4bed797 + bc81603 commit 5d66454
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 40 deletions.
4 changes: 0 additions & 4 deletions Fireworks/Core/data/version.txt

This file was deleted.

82 changes: 46 additions & 36 deletions Fireworks/Core/standalone_build/make_tarball.sh
@@ -1,5 +1,11 @@
#!/bin/bash

dwnCmd="wget --no-check-certificate"
if [ `uname` = "Darwin" ]; then
# compatibility problem on 10.5
dwnCmd="curl -k -O"
fi

getExternals()
{
mkdir ${tard}/external
Expand All @@ -8,9 +14,6 @@ getExternals()
extdl=${tard}/external/lib
mkdir $extdl




ext=`dirname ${CMSSW_DATA_PATH}`/external
ls -l $CMSSW_RELEASE_BASE/external/$SCRAM_ARCH/lib/* > $HOME/extlist

Expand Down Expand Up @@ -49,9 +52,9 @@ getExternals()
ever=`grep $i $HOME/extlist | perl -ne 'if ($_ =~ /$ENV{i}\/(.*)\/lib\/(.*)/ ) {print "$1\n"; last;}'`
echo "copy $i $ever"
if [ -z "$ever" ]; then
echo "!!!!!!!! can't get externals fro $i"
echo "warning can't get externals for $i"
fi
echo "cp -a $ext/$i/$ever/lib/* === ${extdl}"
# echo "cp -a $ext/$i/$ever/lib/* === ${extdl}"
cp -a $ext/$i/$ever/lib/* ${extdl}
done

Expand Down Expand Up @@ -89,29 +92,28 @@ getCmssw()
{
echo "=========================================================="
echo "=========================================================="

# cms libraries
mkdir -p ${tard}/lib

if [ X$patchedBuild = Xon ]; then
echo "getting libs from $CMSSW_RELEASE_BASE/lib/*/* ${tard}/lib/"
cp -a $CMSSW_RELEASE_BASE/lib/*/* ${tard}/lib/
fi

echo "getting libs from $CMSSW_BASE/lib/*/ "
cp -f $CMSSW_BASE/lib/*/* ${tard}/lib/

$dwnCmd https://raw.github.com/cms-sw/cmsdist/IB/CMSSW_7_0_X/stable/fwlite_build_set.file

while read p; do
echo "get libs from $p"
x=`dirname $p`
y=`basename $p`
cp -a $CMSSW_RELEASE_BASE/lib/*/*${x}*${y}* ${tard}/lib/
#if [ -f "$file" ]
cp -f $CMSSW_BASE/lib/*/*${x}*${y}* ${tard}/lib/ 2>/dev/null
#fi
done < fwlite_build_set.file

# plugins cache file
if [ X$patchedBuild = Xon ]; then
echo "get $CMSSW_RELEASE_BASE/lib/*/.edmplugincache > ${tard}/lib/.edmplugincache"
touch ${tard}/lib/.edmplugincache
cat $CMSSW_RELEASE_BASE/lib/*/.edmplugincache | grep -v Fireworks > /tmp/.edmplugincache
cat $CMSSW_RELEASE_BASE/lib/*/.edmplugincache > /tmp/.edmplugincache
cat $CMSSW_BASE/lib/*/.edmplugincache >> /tmp/.edmplugincache
cat /tmp/.edmplugincache | sort -u > ${tard}/lib/.edmplugincache
else
echo "cp $CMSSW_BASE/lib/*/.edmplugincache ${tard}/lib/.edmplugincache"
cp $CMSSW_BASE/lib/*/.edmplugincache ${tard}/lib/.edmplugincache
fi
}

#----------------------------------------------------------------
Expand All @@ -122,16 +124,21 @@ getSources()
echo "getting sources."
# binary
mkdir ${tard}/libexec
cp $CMSSW_BASE/bin/*/cmsShow.exe ${tard}/libexec
cp $CMSSW_BASE/bin/*/cmsShowSendReport ${tard}/libexec
cp $CMSSW_RELEASE_BASE/bin/*/cmsShow.exe ${tard}/libexec
cp $CMSSW_RELEASE_BASE/bin/*/cmsShowSendReport ${tard}/libexec

# src
srcDir="${tard}/src/Fireworks/Core"
mkdir -p $srcDir
cp -a $CMSSW_BASE/src/Fireworks/Core/macros $srcDir
cp -a $CMSSW_BASE/src/Fireworks/Core/icons $srcDir
cp -a $CMSSW_BASE/src/Fireworks/Core/data $srcDir
cp -a $CMSSW_BASE/src/Fireworks/Core/scripts $srcDir
cp -a $CMSSW_RELEASE_BASE/src/Fireworks/Core/macros $srcDir
cp -a $CMSSW_RELEASE_BASE/src/Fireworks/Core/icons $srcDir
cp -a $CMSSW_RELEASE_BASE/src/Fireworks/Core/data $srcDir

cv=`perl -e 'if ($ENV{CMSSW_VERSION} =~ /CMSSW_(\d+)_(\d+)_/) {print "${1}.${2}";}'`
echo $cv > $srcDir/data/version.txt
echo "DataFormats: $CMSSW_VERSION" >> $srcDir/data/version.txt
cat $srcDir/data/version.txt
cp -a $CMSSW_RELEASE_BASE/src/Fireworks/Core/scripts $srcDir

cd $tard
ln -s src/Fireworks/Core/macros/default.fwc .
Expand All @@ -152,11 +159,6 @@ getDataFiles()
{
# sample files
cd $tard
dwnCmd="wget"
if [ `uname` = "Darwin" ]; then
# compatibility problem on 10.5
dwnCmd="curl -O"
fi
cd ${tard}
name=`perl -e '($ver, $a, $b, $c) = split('_', $ENV{CMSSW_VERSION}); print "data", $a, $b, ".root" '`
$dwnCmd http://amraktad.web.cern.ch/amraktad/mail/scratch0/data/$name
Expand Down Expand Up @@ -191,22 +193,29 @@ makeTar()
#----------------------------------------------------------------

if [ $# -lt 1 ]; then
echo "Usage: $0 [-s] [-p] [-v] destination_dir "
echo "Usage: $0 [-t] [-v] destination_dir "
exit 1
fi


while [ $# -gt 0 ]; do
case "$1" in
-s) skipTar=on;;
-p) patchedBuild=on;;
-t) doTar=on;;
-v) verbose=on;
esac
tard=${PWD}/$1
tard=$1
shift
done


if [[ "$tard" = /* ]]
then
: # Absolute path
else
: tard=$PWD/$tard
fi

echo "dirpath = $tard"

if [ "X$verbose" = Xon ] ; then
set -xv
Expand All @@ -216,6 +225,7 @@ if [ -f $tard ]; then
echo "dir exist alreday"
exit
fi

mkdir $tard

origd=$PWD
Expand All @@ -224,7 +234,7 @@ getCmssw
getSources
getDataFiles
echo $tard
if [ "X$skipTar" != Xon ] ; then
if [ "X$doTar" = Xon ] ; then
makeTar
fi

0 comments on commit 5d66454

Please sign in to comment.