#!/bin/bash
export LC_ALL=C
__DIR=`pwd`
PETSC_DIR=$__DIR/builds/petsc-3.6.3
PETSC_ARCH=linux-gnu-c
sh configure_genfem.sh
cd $__DIR
cd builds
cd genFem
echo "Building genFem"
make -j 6
echo "Check targets"
ctest -E gmsh
if [ -f $__DIR/builds/genFem/applications/elastic_genTerm/elastic_genTerm ];
then
echo "All seem fine."
echo "Set the following environment variables in your .bashrc (local) or in /etc/environment (system wide) :"
echo "export PETSC_ARCH=$PETSC_ARCH"
echo "export PETSC_DIR=$PETSC_DIR"
else
echo "No target built. Installation problem !"
fi

