#!/bin/bash # # This scripts stores required packages locally prior to calling # checkcommits.sh such that e.g. they don't are accessed over the network. function checkdir { # $1 is the variable name # $2 is the variable to check if [ -z $2 ]; then echo "Please set a $1 environment variable." exit 1 fi } # TMPDIR is where we test checkdir TMPDIR $TMPDIR # PACKAGEDIR contains required packages checkdir PACKAGEDIR $PACKAGEDIR # MOLECUILDERDIR contains molecuilder repo to check checkdir MOLECUILDERDIR $MOLECUILDERDIR if [ -z $2 ]; then echo "Usage: $0 " exit 1 fi mkdir -p /tmp/ccache-heber # make dependencies local for depdir in boost-1.47 Qt-4.7.4 CodePatterns-1.2.3 JobMarket-1.1.1; do echo "Syncing local ${depdir} with remote ..." if [ ! -e $TMPDIR/dependencies/${depdir} ]; then echo "Creating dir ..." mkdir -p $TMPDIR/dependencies/${depdir} fi rsync -avz --delete-after $PACKAGEDIR/${depdir}/ $TMPDIR/dependencies/${depdir} done find $TMPDIR/dependencies/ -path '*/pkgconfig/*' -name '*.pc' -exec sed -i -e "s#$PACKAGEDIR#$TMPDIR/dependencies#g" {} \; export PKG_CONFIG_PATH="$TMPDIR/dependencies/Qt-4.7.4/lib/pkgconfig" rm molecuilder -rf ./CheckMolecuilderCommitRanges.sh $MOLECUILDERDIR molecuilder $1 $2 --with-Qt-dir=$TMPDIR/dependencies/Qt-4.7.4 --with-Qt-bin=$TMPDIR/dependencies/Qt-4.7.4/bin --with-codepatterns=$TMPDIR/dependencies/CodePatterns-1.2.3 --enable-jobmarket --enable-vmg --with-vmg-mpi --with-jobmarket=$TMPDIR/dependencies/JobMarket-1.1.1 --with-boost=$TMPDIR/dependencies/boost-1.47 --enable-ecut --enable-python --enable-qtgui CCACHE_DIR="/tmp/ccache-heber/" CXX="ccache g++" MPICXX="mpicxx.openmpi" CXXFLAGS="-Wall -g3" PKG_CONFIG_PATH="$TMPDIR/dependencies/Qt-4.7.4/lib/pkgconfig"