correctly use "type" to detect executables/scripts
This commit is contained in:
@ -31,17 +31,17 @@ done
|
|||||||
if (test $1 = 1) then
|
if (test $1 = 1) then
|
||||||
|
|
||||||
CONFIGSCRIPT=none
|
CONFIGSCRIPT=none
|
||||||
if ( test `which adios2-config 2>> /dev/null` ) then
|
if ( type adios2-config > /dev/null 2>&1 ) then
|
||||||
CONFIGSCRIPT=adios2-config
|
CONFIGSCRIPT=adios2-config
|
||||||
elif ( ! test -z "$ADIOS2_DIR" ) then
|
elif ( ! test -z "$ADIOS2_DIR" ) then
|
||||||
if ( test `which $ADIOS2_DIR/bin/adios2-config` ) then
|
if ( type $ADIOS2_DIR/bin/adios2-config > /dev/null 2>&1 ) then
|
||||||
CONFIGSCRIPT=$ADIOS2_DIR/bin/adios2-config
|
CONFIGSCRIPT=$ADIOS2_DIR/bin/adios2-config
|
||||||
else
|
else
|
||||||
echo "ERROR: ADIOS2_DIR environment variable is set but" \
|
echo "ERROR: ADIOS2_DIR environment variable is set but" \
|
||||||
"\$ADIOS2_DIR/bin/adios2-config does not exist"
|
"\$ADIOS2_DIR/bin/adios2-config does not exist"
|
||||||
fi
|
fi
|
||||||
elif ( ! test -z "$ADIOS_DIR" ) then
|
elif ( ! test -z "$ADIOS_DIR" ) then
|
||||||
if ( test `which $ADIOS_DIR/bin/adios2-config` ) then
|
if ( type $ADIOS_DIR/bin/adios2-config > /dev/null 2>&1 ) then
|
||||||
CONFIGSCRIPT=$ADIOS_DIR/bin/adios2-config
|
CONFIGSCRIPT=$ADIOS_DIR/bin/adios2-config
|
||||||
else
|
else
|
||||||
echo "ERROR: ADIOS_DIR environment variable is set but" \
|
echo "ERROR: ADIOS_DIR environment variable is set but" \
|
||||||
|
|||||||
@ -46,7 +46,7 @@ action mliap_model_python_couple.pyx python_impl.cpp
|
|||||||
# edit 2 Makefile.package files to include/exclude package info
|
# edit 2 Makefile.package files to include/exclude package info
|
||||||
|
|
||||||
if (test $1 = 1) then
|
if (test $1 = 1) then
|
||||||
if (test "$(type cythonize 2> /dev/null)" != "" && test -e ../python_impl.cpp) then
|
if (type cythonize > /dev/null 2>&1 && test -e ../python_impl.cpp) then
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DMLIAP_PYTHON |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-DMLIAP_PYTHON |' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
@ -69,7 +69,7 @@ elif (test $1 = 0) then
|
|||||||
sed -i -e '/^include.*python.*mliap_python.*$/d' ../Makefile.package.settings
|
sed -i -e '/^include.*python.*mliap_python.*$/d' ../Makefile.package.settings
|
||||||
|
|
||||||
elif (test $1 = 2) then
|
elif (test $1 = 2) then
|
||||||
if (type cythonize 2>&1 > /dev/null && test -e ../python_impl.cpp) then
|
if (type cythonize > /dev/null 2>&1 && test -e ../python_impl.cpp) then
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*-DMLIAP_PYTHON[^ \t]* //g' ../Makefile.package
|
sed -i -e 's/[^ \t]*-DMLIAP_PYTHON[^ \t]* //g' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user