#!/bin/bash # Usage: install_clean TARGET DATE # Where TARGET is e.g. bundle-complete (see ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/) # And DATE is an optional date to check the libraries out TARGET="$1" DATE="$2" if [ "$TARGET" == "nightly" ]; then cd /tmp curl ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz\ | tar -xz rm -rf /opt/clean mv clean-bundle-complete /opt/clean else echo "Broken on GCC >= 6..." sleep 5 if [ "$DATE" != "" ]; then export CLEANDATE="$DATE" fi cd /tmp git clone -b build-by-date https://gitlab.science.ru.nl/cstaps/clean-build cd "clean-build/clean-$TARGET/linux-x64" ./fetch.sh ./setup.sh ./build.sh rm -rf /opt/clean mv "target/clean-$TARGET" /opt/clean cd /tmp rm -rf clean-build fi cat ~/.clean/iTasksDev.env >> /opt/clean/etc/IDEEnvs mv /opt/clean/lib/exe /opt/clean/exe ln -s /opt/clean/exe /opt/clean/lib/exe rm -r /opt/clean/lib/Generics rm -r /opt/clean/lib/StdLib sed -i 's=lib/exe/linker=lib/exe/linker:-no-pie=' /opt/clean/etc/IDEEnvs cloogletags -a -c -d /opt/clean/lib -o /opt/clean/lib/tags ln -s /home/camil/VersionControl/clean-test/cleantest /opt/clean/bin/cleantest ln -s /home/camil/VersionControl/clean-test-properties/makecleantest /opt/clean/bin/makecleantest