#!/bin/bash
set -eu

#This script is very specific to the larour larsen nightly using adolc. 
#It relies on just an update of adolc, and symlink to an existing adolc 
#repo. 

#Some cleanup
rm -rf install adolc_issm

#symlink: 
ln -s  /u/astrid-r1b/larour/issm-uci/trunk-jpl/externalpackages/adolc/adolc_issm ./adolc_issm

#update and compile
cd adolc_issm
git pull

autoreconf -f -i 
./configure --prefix=$ISSM_DIR/externalpackages/adolc/install 

if [ $# -eq 0 ]; then
	make
else
	make -j $1
fi
make install
