#! /bin/csh -f
#
# a quick hack   - Nov 2010
# converted to uns_projects for the new git based distros
#
#  need:  libboost, libboost-system, libboost-thread
#
# g77:        -lfrtbegin -lg2c
# gfortran:   -lgfortran

set dir=$NEMO/usr/jcl/uns_projects

# for linux
set args=""

#check unsio is installed
if (! -f ${NEMOLIB}64/libunsio.so && ! -f ${NEMOLIB}/libunsio.so ) then
	mknemo -r unsio
endif

if (! -e $dir) then
  cd $NEMO/usr/jcl
  git clone https://gitlab.lam.fr/jclamber/uns_projects
endif

if (-e $dir) then
  rm -rf $dir/build
  mkdir -p $dir/build
  cd $dir/build
  cmake .. -DCMAKE_INSTALL_PREFIX=${NEMO}
  make -i
  make -i install
  #  somehow a few binaries from usr/jcl/uns_projects/build/bin were not copied to $NEMOBIN
  cp bin/* $NEMOBIN

  echo mknemo.d: $dir does not exist
endif


echo  pip install python-unsiotools -U
