corrected syntax errors
This commit is contained in:
parent
485ed3742c
commit
ee3049b761
|
@ -18,8 +18,9 @@ echo "MSC version: $VERSION"
|
||||||
|
|
||||||
INSTALLDIR=''
|
INSTALLDIR=''
|
||||||
if [ -f $WORKINGDIR/../../lib/pathinfo ]; then
|
if [ -f $WORKINGDIR/../../lib/pathinfo ]; then
|
||||||
INSTALLDIR=`grep -vE "^[[:space:]]*#|^$" | grep msc $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
INSTALLDIR=`grep -vE "^[[:space:]]*#|^$" $WORKINGDIR/../../lib/pathinfo | grep msc | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while [ ! -d "$INSTALLDIR" ] || [ -z "$INSTALLDIR" ]
|
while [ ! -d "$INSTALLDIR" ] || [ -z "$INSTALLDIR" ]
|
||||||
do
|
do
|
||||||
echo "Input path of MARC/MENTAT installation: [${DEFAULT_INSTALLDIR}]"
|
echo "Input path of MARC/MENTAT installation: [${DEFAULT_INSTALLDIR}]"
|
||||||
|
@ -35,17 +36,17 @@ echo "MSC installation path: $INSTALLDIR"
|
||||||
BLASDIR=''
|
BLASDIR=''
|
||||||
FFTWDIR=''
|
FFTWDIR=''
|
||||||
if [ -f $WORKINGDIR/../../lib/pathinfo ]; then
|
if [ -f $WORKINGDIR/../../lib/pathinfo ]; then
|
||||||
IKMLDIR=`grep -vE "^[[:space:]]*#|^$" | grep ikml $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
IKMLDIR=`grep -vE "^[[:space:]]*#|^$" $WORKINGDIR/../../lib/pathinfo | grep -i ikml | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
||||||
ACMLDIR=`grep -vE "^[[:space:]]*#|^$" | grep acml $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
ACMLDIR=`grep -vE "^[[:space:]]*#|^$" $WORKINGDIR/../../lib/pathinfo | grep -i acml | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
||||||
LAPACKDIR=`grep -vE "^[[:space:]]*#|^$" | grep lapack $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
LAPACKDIR=`grep -vE "^[[:space:]]*#|^$" $WORKINGDIR/../../lib/pathinfo | grep -i lapack | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
||||||
FFTWDIR=`grep -vE "^[[:space:]]*#|^$" | grep fftw $WORKINGDIR/../../lib/pathinfo | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
FFTWDIR=`grep -vE "^[[:space:]]*#|^$" $WORKINGDIR/../../lib/pathinfo | grep -i fftw | head -n1 | awk 'BEGIN { FS = "[ \t]+" } ; { print $2 }'`
|
||||||
if [ -d "$IKMLDIR" ]
|
if [ -d "$IKMLDIR" ]; then
|
||||||
BLASDIR=$IKMLDIR
|
BLASDIR=$IKMLDIR
|
||||||
BLASTYPE='IKML'
|
BLASTYPE='IKML'
|
||||||
elif [ -d "$ACMLDIR" ]
|
elif [ -d "$ACMLDIR" ]; then
|
||||||
BLASDIR=$ACMLDIR
|
BLASDIR=$ACMLDIR
|
||||||
BLASTYPE='ACML'
|
BLASTYPE='ACML'
|
||||||
elif [ -d "$LAPACKDIR" ]
|
elif [ -d "$LAPACKDIR" ]; then
|
||||||
BLASDIR=$LAPACKDIR
|
BLASDIR=$LAPACKDIR
|
||||||
BLASTYPE='LAPACK'
|
BLASTYPE='LAPACK'
|
||||||
fi
|
fi
|
||||||
|
@ -59,13 +60,19 @@ do
|
||||||
read BLASTYPE
|
read BLASTYPE
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -d "$FFTWDIR" ]
|
echo $IKMDIR
|
||||||
|
echo $ACMLDIR
|
||||||
|
echo $LAPACKDIR
|
||||||
|
echo $FFTWDIR
|
||||||
|
|
||||||
|
if [ ! -d "$FFTWDIR" ]; then
|
||||||
echo "error, FFTW must be installed and specified in DAMASK_ROOT/lib/pathinfo"
|
echo "error, FFTW must be installed and specified in DAMASK_ROOT/lib/pathinfo"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BLASDIR=${BLASDIR%/} # remove trailing slash
|
BLASDIR=${BLASDIR%/} # remove trailing slash
|
||||||
FFTWDIR=${FFTWDIR%/} # remove trailing slash
|
FFTWDIR=${FFTWDIR%/} # remove trailing slash
|
||||||
|
echo '3'
|
||||||
|
|
||||||
case $BLASTYPE in
|
case $BLASTYPE in
|
||||||
IKML | ikml)
|
IKML | ikml)
|
||||||
|
@ -84,6 +91,7 @@ case $BLASTYPE in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
FFTW=" -L${FFTWDIR}/lib -lfftw3_threads -lfftw3"
|
FFTW=" -L${FFTWDIR}/lib -lfftw3_threads -lfftw3"
|
||||||
|
echo '4'
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
echo ''
|
echo ''
|
||||||
|
|
Loading…
Reference in New Issue