#!/usr/bin/env bash # protopop@jlab.org, June 2007 clear echo "Doing postinstall ..." # reset the PATH environment variable echo "Resetting PATH and TOP_DIR ..." export TOP_DIR="." export PATH="/usr/kerberos/bin:/bin:/usr/bin/:/usr/X11R6/bin:/usr/bin/X11" echo " PATH=$PATH" echo " TOP_DIR=$TOP_DIR" # setting the environment stage echo -n "Setting up the new environment ... " cd cbmsoft rm -rf log && mkdir log source SetEnv.sh > /dev/null 2>&1 echo "[done]" # compiling cbmsoft stage echo -n "Compiling external packages (this may take a few hours) ... " ./configure.sh > log/cbmconf.`date +%y%m%d%H%M`.log 2>&1 if [ "$?" = 1 ] then echo "[fail]" exit 1 else echo "[done]" fi echo "Environment:" echo " LD_LIBRARY_PATH=$LD_LIBRARY_PATH" echo " ROOTSYS=$ROOTSYS" # compiling pandaroot stage echo -n "Compiling PANDA software (this may take a few minutes) ... " cd pandaroot/ ./reconf > ../log/pndreco.`date +%y%m%d%H%M`.log 2>&1 cd ../ && mkdir -p build && cd build ../pandaroot/configure --prefix=$PWD --enable-geant3 --enable-geant4 > ../log/pndconf.`date +%y%m%d%H%M`.log 2>&1 make install > ../log/pndmake.`date +%y%m%d%H%M`.log 2>&1 echo "[done]" echo 'End.'