Commit 3b8884b9 authored by Leroy Jenkins's avatar Leroy Jenkins
Browse files

[Build] make nagfor-check version compatible

parent 6c566dab
......@@ -62,37 +62,35 @@ function gcc-check {
}
function nagfor-check {
# WORKAROUND FOR nagfor 6.00
if [[ "$FCRELEASE" == '6.00' ]]; then
FCRELEASE=6.0
fi
if [[ "$FCRELEASE" == '6-LATEST' ]]; then
FCRELEASE=6.0
fi
FCOUT=`$FC_BINPATH/$FCBIN -V 2>&1 | grep $FCRELEASE`
if [[ "$FCMINOR" == "LATEST" ]]; then
FC_PATH=$PREFIX/`ls -l $PREFIX/$FC_LABEL | grep -o -E nagfor-[0-9]+.[0-9]+-[0-9]+$`
FC_REVISION=`ls -l $PREFIX/$FC_LABEL | grep -o -E [0-9]+$`
FC_BINPATH=$FC_PATH/bin
FC_LIBPATH=$FC_PATH/$LIB_SUFFIX/
MATCH=1
if [[ "$FCRELEASE" == '6.0' ]]; then
FCOUTMINOR=`echo $FCOUT | grep -E -o "[0123456789]{4}"`
else
FCOUTMINOR=`echo $FCOUT | grep -E -o "[0123456789]{3}"`
fi
# What's the real version of our nagfor
FCOUTVERSION=`$FC_BINPATH/$FCBIN -V 2>&1 | head -n 1 | grep -o [0-9].[0-9] | head -n 1`
FCOUTRELEASE=`echo $FCOUT | grep -o "[0123456789]\.[0123456789]"`
FC_VERSION=$FCOUTVERSION-$FC_REVISION
FC_ACTUAL_LABEL=$FC_LABEL
set +x
if [[ "$FCOUTRELEASE" == "$FCRELEASE" ]]; then
MATCH=1
echo "Link: $FC_LABEL -> $FC_VERSION"
else
MATCH=0
fi
if [[ "$FCOUTRELEASE" == '6.0' ]]; then
FCOUTRELEASE=6.00
FCOUT=`$FC_BINPATH/$FCBIN -V 2>&1 | grep $FC_VERSION`
FCOUTVERSION=`echo $FCOUT | grep -o $FC_VERSION`
FCOUTDATE=""
FC_REVISION=""
FC_ACTUAL_LABEL=$FC_LABEL
if [[ "$FCOUTVERSION" == "$FC_VERSION" ]]
then
MATCH=1
else
MATCH=0
fi
fi
FC_PATH=$PREFIX/$FCBIN-$FCOUTRELEASE-$FCOUTMINOR
FC_BINPATH=$FC_PATH/bin
FC_LIBPATH=$FC_PATH/lib:$PREFIX/gcc-5-LATEST/lib/
FC_ACTUAL_LABEL=${FC_LABEL/LATEST/$FCOUTMINOR}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment