Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on the morning of Tuesday 11th August 2020, starting at approximately 9am PDT. It is expected to take around 20 minutes and there will be a short period of downtime (less than five minutes) towards the end of the maintenance window. Please direct any comments, questions, or concerns to computing-help@ligo.org.

build.sh 1.65 KB
Newer Older
1 2
#!/bin/bash

Daniel Brown's avatar
Daniel Brown committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
platform='unknown'
unamestr=`uname`
unamem=`uname -m`

if [[ "$unamestr" == 'Linux' ]]; then
    if [[ "${ARCH}" == '32' ]]; then
        ./finesse.sh --build-linux32
    else
        ./finesse.sh --build-linux
    fi
    
    cp ./kat ${PREFIX}/bin
    cp ./kat.ini ${PREFIX}/bin
    
elif [[ "$unamestr" == 'Darwin' ]]; then
    if [[ "${ARCH}" == '32' ]]; then
       ./finesse.sh --build-mac32
    else
       ./finesse.sh --build-mac
    fi
    
    cp ./kat ${PREFIX}/bin
    cp ./kat.ini ${PREFIX}/bin
    
elif [[ "$unamestr" == *CYGWIN* ]]; then
    if [[ "$unamem" == 'i686' ]]; then
        ./finesse.sh --build-win32
    else
        ./finesse.sh --build-win64
    fi
    
    cp ./kat.exe ${PREFIX}/bin
    cp ./kat.ini ${PREFIX}/bin
    
elif [[ "$unamestr" == *MINGW32* ]]; then
    echo "Platform not supported" | tee -a $LOGFILE
    failure
else
   echo "Platform could not be determined" | tee -a $LOGFILE
   failure
fi
44

45 46 47 48 49 50 51 52
# Setup saved env vars https://conda.io/docs/using/envs.html
mkdir -p ${PREFIX}/etc/conda/activate.d
mkdir -p ${PREFIX}/etc/conda/deactivate.d

touch ${PREFIX}/etc/conda/activate.d/finesse_vars.sh
touch ${PREFIX}/etc/conda/deactivate.d/finesse_vars.sh

echo "#!/bin/bash" >> ${PREFIX}/etc/conda/activate.d/finesse_vars.sh
Daniel Brown's avatar
Daniel Brown committed
53 54
echo "export KATINI=\${CONDA_PREFIX}/bin/kat.ini" >> ${PREFIX}/etc/conda/activate.d/finesse_vars.sh
echo "export FINESSE_DIR=\${CONDA_PREFIX}/bin/" >> ${PREFIX}/etc/conda/activate.d/finesse_vars.sh
55 56 57 58

echo "#!/bin/bash" >> ${PREFIX}/etc/conda/deactivate.d/finesse_vars.sh
echo "unset KATINI" >> ${PREFIX}/etc/conda/deactivate.d/finesse_vars.sh
echo "unset FINESSE_DIR" >> ${PREFIX}/etc/conda/deactivate.d/finesse_vars.sh