https://github.com/SixTrack/SixTrack
Tip revision: 8b82eb1a73ad852c2969817fb8a366352e468abb authored by Veronica K. Berglyd Olsen on 27 March 2019, 11:57:46 UTC
Merge pull request #778 from vkbo/release_5.2
Merge pull request #778 from vkbo/release_5.2
Tip revision: 8b82eb1
buildLibraries.sh
#!/usr/bin/env bash
# Script for building SixTrack dependencies that do not eed to be re-built every time SixTrack is built.
set -e # Exit on error
echo ""
echo " Building SixTrack Library Dependecies"
echo "========================================"
echo ""
ALL=true
BOINC=false
LIBARCH=false
ZLIB=false
HDF5=false
PYTHIA=false
NAFF=false
for ARG in "$@"; do
if [[ $ARG == "boinc" ]]; then
BOINC=true
LIBARCH=true
ZLIB=true
echo "Boinc depends on libarchive and zlib, libarchive and zlib enabled as well."
elif [[ $ARG == "libarchive" ]]; then
LIBARCH=true
ZLIB=true
echo "Libarchive depends on zlib, zlib enabled as well."
elif [[ $ARG == "hdf5" ]]; then
HDF5=true
ZLIB=true
echo "HDF5 depends on zlib, zlib enabled as well."
elif [[ $ARG == "pythia" ]]; then
PYTHIA=true
elif [[ $ARG == "naff" ]]; then
NAFF=true
else
echo "Unknown library $ARG requested."
exit 1
fi
echo "Will build $ARG"
ALL=false
done
if [ $BOINC = true ] || [ $ALL = true ]; then
git submodule init lib/boinc
git submodule update lib/boinc
cd lib
./buildBoinc.sh
cd ..
fi
# If building libArchive or HDF5, ZLib must be built first!
if [ $ZLIB = true ] || [ $ALL = true ]; then
cd lib
source ./buildZlib.sh
cd ..
fi
if [ $LIBARCH = true ] || [ $ALL = true ]; then
git submodule init lib/libarchive
git submodule update lib/libarchive
cd lib
./buildLibarchive.sh
cd ..
fi
if [ $HDF5 = true ] || [ $ALL = true ]; then
cd lib
./buildHDF5.sh
cd ..
fi
if [ $PYTHIA = true ] || [ $ALL = true ]; then
cd lib
./buildPythia.sh
cd ..
fi
if [ $NAFF = true ] || [ $ALL = true ]; then
cd lib
./buildNAFF.sh
cd ..
fi