#!/bin/bash # Script install the data files needed by GEANT4. This script is only # needed if Geant4 is not able to download the correct files on its own. # This can be the case if the computer is behind a proxy or is not allowed # to contact the internet at all, e.g. as for some grid sites. # The script unpacks the data files at the correct location if they are # present in the geant4 source directory. if [ "$make_install" = "yes" ]; then install_data=$SIMPATH_INSTALL/share/$GEANT4VERSIONp/data else install_data=$SIMPATH/transport/geant4/share/$GEANT4VERSIONp/data fi data_source=$SIMPATH/transport mkdir -p $install_data # create unique links which is independent of the Geant4 version if [ ! -L $install_prefix/share/Geant4 ]; then ln -s $install_prefix/share/$GEANT4VERSIONp $install_prefix/share/Geant4 fi echo "**** Installing the Geant4 data files ****" | tee -a $logfile cd $install_data if [ ! -d G4EMLOW6.23 ]; then if [ -e $data_source/G4EMLOW.6.23.tar.gz ]; then cp $data_source/G4EMLOW.6.23.tar.gz . untar G4EMLOW G4EMLOW.6.23.tar.gz ln -s G4EMLOW6.23 G4EMLOW rm G4EMLOW.6.23.tar.gz else echo "Could not find file G4EMLOW.6.23.tar.gz in $data_source" | tee -a $logfile fi else echo "Package G4EMLOW6.23 already installed." | tee -a $logfile fi if [ ! -d G4NDL4.0 ]; then if [ -e $data_source/G4NDL.4.0.tar.gz ]; then cp $data_source/G4NDL.4.0.tar.gz . untar G4NDL G4NDL.4.0.tar.gz ln -s G4NDL4.0 G4NDL rm G4NDL.4.0.tar.gz else echo "Could not find file G4NDL.4.0.tar.gz in $data_source" | tee -a $logfile fi else echo "Package G4NDL4.0 already installed." | tee -a $logfile fi if [ ! -d RadioactiveDecay3.4 ]; then if [ -e $data_source/G4RadioactiveDecay.3.4.tar.gz ]; then cp $data_source/G4RadioactiveDecay.3.4.tar.gz . untar RadioactiveDecay G4RadioactiveDecay.3.4.tar.gz ln -s RadioactiveDecay3.4 RadioactiveDecay rm G4RadioactiveDecay.3.4.tar.gz else echo "Could not find file G4RadioactiveDecay.3.4.tar.gz in $data_source" | tee -a $logfile fi else echo "Package RadioactiveDecay3.4 already installed." | tee -a $logfile fi if [ ! -d PhotonEvaporation2.2 ]; then if [ -e $data_source/PhotonEvaporation.2.2.tar.gz ]; then cp $data_source/PhotonEvaporation.2.2.tar.gz . untar PhotonEvaporation PhotonEvaporation.2.2.tar.gz ln -s PhotonEvaporation2.2 PhotonEvaporation rm PhotonEvaporation.2.2.tar.gz else echo "Could not find file PhotonEvaporation.2.2.tar.gz in $data_source" | tee -a $logfile fi else echo "Package PhotonEvaporation2.2 already installed." | tee -a $logfile fi if [ ! -d G4ABLA3.0 ]; then if [ -e $data_source/G4ABLA.3.0.tar.gz ]; then cp $data_source/G4ABLA.3.0.tar.gz . untar G4ABLA G4ABLA.3.0.tar.gz ln -s G4ABLA3.0 G4ABLA rm G4ABLA.3.0.tar.gz else echo "Could not find file G4ABLA.3.0.tar.gz in $data_source" | tee -a $logfile fi else echo "Package G4ABLA3.0 already installed." | tee -a $logfile fi if [ ! -d RealSurface1.0 ]; then if [ -e $data_source/RealSurface.1.0.tar.gz ]; then cp $data_source/RealSurface.1.0.tar.gz . untar RealSurface RealSurface.1.0.tar.gz ln -s RealSurface1.0 RealSurface rm RealSurface.1.0.tar.gz else echo "Could not find file RealSurface.1.0.tar.gz in $data_source" | tee -a $logfile fi else echo "Package RealSurface1.0 already installed." | tee -a $logfile fi if [ ! -d G4NEUTRONXS1.1 ]; then if [ -e $data_source/G4NEUTRONXS.1.1.tar.gz ]; then cp $data_source/G4NEUTRONXS.1.1.tar.gz . untar G4NEUTRONXS G4NEUTRONXS.1.1.tar.gz ln -s G4NEUTRONXS1.1 G4NEUTRONXS rm G4NEUTRONXS.1.1.tar.gz else echo "Could not find file G4NEUTRONXS.1.1.tar.gz in $data_source" | tee -a $logfile fi else echo "Package G4NEUTRONXS1.1 already installed." | tee -a $logfile fi if [ ! -d G4PII1.3 ]; then if [ -e $data_source/G4PII.1.3.tar.gz ]; then cp $data_source/G4PII.1.3.tar.gz . untar G4PII G4PII.1.3.tar.gz ln -s G4PII1.3 G4PII rm G4PII.1.3.tar.gz else echo "Could not find file G4PII.1.3.tar.gz in $data_source" | tee -a $logfile fi else echo "Package G4PII1.3 already installed." | tee -a $logfile fi cd $SIMPATH return 1