2020-02-09 11:18:42 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-03-10 15:20:09 -06:00
|
|
|
#. /etc/*-release
|
|
|
|
#arch="Linux.el9"
|
|
|
|
#if [ "`echo ${VERSION} | cut -c 1`" == "7" ]; then
|
|
|
|
# echo "Building for RHEL 7"
|
|
|
|
# arch="Linux.el7_64"
|
|
|
|
#fi
|
|
|
|
|
|
|
|
arch="Linux.el9"
|
|
|
|
if [ "`hostname -s`" == "bop" ]; then
|
|
|
|
echo "Building for RHEL 7"
|
|
|
|
arch="Linux.el7_64"
|
|
|
|
fi
|
|
|
|
|
2023-01-02 05:24:19 -06:00
|
|
|
nightly=""
|
|
|
|
if [[ "`pwd`" =~ /nightly/ ]]; then
|
|
|
|
nightly="/nightly"
|
|
|
|
fi
|
2023-08-04 09:45:46 -05:00
|
|
|
root="${HOME}${nightly}"
|
2023-01-02 05:24:19 -06:00
|
|
|
|
2023-08-04 09:45:46 -05:00
|
|
|
getString ()
|
|
|
|
{
|
|
|
|
string=`echo $1 | cut -d '=' -f 2-`
|
|
|
|
echo $string
|
|
|
|
}
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
--github-runner=*) echo "Using Github/runner profile.";
|
|
|
|
onGithub="true"
|
|
|
|
root=`getString $1`;;
|
|
|
|
esac
|
2023-08-04 09:57:18 -05:00
|
|
|
shift
|
2023-08-04 09:45:46 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
if [ "${onGithub}" = "true" ]; then
|
|
|
|
arch="Linux.x86_64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
srcDir=${root}/coriolis-2.x/src/alliance/alliance/src
|
|
|
|
commonRoot=${root}/coriolis-2.x/${arch}/Release.Shared
|
|
|
|
#commonRoot=${root}/coriolis-2.x/${arch}/Debug.Shared
|
2020-02-09 11:18:42 -06:00
|
|
|
buildDir=${commonRoot}/build
|
|
|
|
installDir=${commonRoot}/install
|
|
|
|
|
|
|
|
export ALLIANCE_TOP=${installDir}
|
|
|
|
export LD_LIBRARY_PATH=${installDir}/lib:${LD_LIBRARY_PATH}
|
|
|
|
|
|
|
|
cd ${srcDir}
|
|
|
|
# Skip doc generation to avoid pulling TeXLive in docker images.
|
|
|
|
sed -i 's,dirs="\$newdirs documentation",dirs="$newdirs",' ./autostuff
|
|
|
|
./autostuff clean
|
|
|
|
./autostuff
|
|
|
|
mkdir -p ${buildDir}
|
|
|
|
cd ${buildDir}
|
|
|
|
${srcDir}/configure --prefix=${ALLIANCE_TOP} --enable-alc-shared
|
|
|
|
make -j1 install
|