2016-07-30 17:53:18 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if (( $# != 1 )); then
|
|
|
|
echo "usage: `basename $0` <archive>" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ARC=$1
|
|
|
|
|
|
|
|
INITDIR=`pwd`
|
2018-07-31 00:35:17 +01:00
|
|
|
|
|
|
|
##################
|
|
|
|
#untar
|
|
|
|
##################
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
tar -xf ${ARC}
|
2018-07-31 00:35:17 +01:00
|
|
|
ARCDIR=`tar -tf ${ARC} | head -n1 | sed -e 's@/.*@@'`
|
|
|
|
rm -f ${ARC}
|
|
|
|
|
|
|
|
###############################
|
|
|
|
# Link to a deterministic name
|
|
|
|
###############################
|
|
|
|
|
|
|
|
mv ${ARCDIR} Eigen
|
|
|
|
|
|
|
|
# Eigen source headers
|
|
|
|
cd ${INITDIR}/Eigen
|
|
|
|
|
|
|
|
echo 'eigen_files =\' > ${INITDIR}/lib/Eigen.inc
|
|
|
|
find Eigen -name "*.h" -print | sed 's/^/ /;$q;s/$/ \\/' >> ${INITDIR}/lib/Eigen.inc
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
cd ${INITDIR}
|
2018-07-31 00:35:17 +01:00
|
|
|
echo 'eigen_unsupp_files =\' >> ${INITDIR}/lib/Eigen.inc
|
|
|
|
find Eigen/unsupported/Eigen -name "*.h" -print | sed 's/^/ /;$q;s/$/ \\/' >> ${INITDIR}/lib/Eigen.inc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###################################
|
|
|
|
# back to home
|
|
|
|
###################################
|
|
|
|
cd ${INITDIR}
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Make grid includes happy
|
|
|
|
#########################################
|
|
|
|
mkdir ${INITDIR}/lib/Eigen/
|
|
|
|
|
|
|
|
ln -s ${INITDIR}/Eigen/Eigen/* ${INITDIR}/lib/Eigen/
|
|
|
|
ln -s ${INITDIR}/Eigen/unsupported ${INITDIR}/lib/Eigen/
|