From a567a46013f6124d41809b47b748299b91c09eb7 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 21 Oct 2005 13:49:43 +0000 Subject: [PATCH] fix a bug with 'test -n' option --- config_files/Python-2.2.1.sh | 2 +- config_files/Python-2.3.4.sh | 2 +- config_files/graphviz-1.9.sh | 2 +- config_files/graphviz-2.2.1.sh | 2 +- config_files/med-2.1.6.sh | 4 ++-- config_files/med-2.2.2.sh | 4 ++-- config_files/sip-3.3.2.sh | 2 +- config_files/sip-4.1.sh | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config_files/Python-2.2.1.sh b/config_files/Python-2.2.1.sh index 138125e..2ddc754 100755 --- a/config_files/Python-2.2.1.sh +++ b/config_files/Python-2.2.1.sh @@ -6,7 +6,7 @@ if [ -z "$PYTHONHOME" ]; then return 1 fi isPython=`which python 2>/dev/null` -if [ -n isPython ]; then +if [ -n "$isPython" ]; then # version number is calculated as: *10000+*100+ # e.g. for Python 2.2.1 it is equal to 20201 ver=`python -V 2>&1` diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh index 23f68b0..3d5b8b8 100755 --- a/config_files/Python-2.3.4.sh +++ b/config_files/Python-2.3.4.sh @@ -6,7 +6,7 @@ if [ -z "$PYTHONHOME" ]; then return 1 fi isPython=`which python 2>/dev/null` -if [ -n isPython ]; then +if [ -n "$isPython" ]; then # version number is calculated as: *10000+*100+ # e.g. for Python 2.3.4 it is equal to 20304 ver=`python -V 2>&1` diff --git a/config_files/graphviz-1.9.sh b/config_files/graphviz-1.9.sh index b047817..b28c4bc 100755 --- a/config_files/graphviz-1.9.sh +++ b/config_files/graphviz-1.9.sh @@ -3,7 +3,7 @@ check_version() { isdot=`which dot 2>/dev/null` -if [ -n isdot ]; then +if [ -n "$isdot" ]; then ver=`dot -V 2>&1 | awk '{print $3}'` if [ "$ver" == "1.9" ]; then return 0 diff --git a/config_files/graphviz-2.2.1.sh b/config_files/graphviz-2.2.1.sh index a3880fb..e2302c7 100755 --- a/config_files/graphviz-2.2.1.sh +++ b/config_files/graphviz-2.2.1.sh @@ -3,7 +3,7 @@ check_version() { isdot=`which dot 2>/dev/null` -if [ -n isdot ]; then +if [ -n "$isdot" ]; then ver=`dot -V 2>&1 | awk '{print $3}'` if [ "$ver" == "2.2.1" ]; then return 0 diff --git a/config_files/med-2.1.6.sh b/config_files/med-2.1.6.sh index b6be806..df10281 100755 --- a/config_files/med-2.1.6.sh +++ b/config_files/med-2.1.6.sh @@ -78,7 +78,7 @@ rm -fr ${PRODUCT_WORK} ### modify libmed.la libmedC.la files to correct direct path to hdf5 library cd ${PRODUCT_DIR}/lib tmp="" -if [ -n ${HDF5HOME} ]; then +if [ -n "${HDF5HOME}" ]; then tmp="-L${HDF5HOME}/lib" fi sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new @@ -101,7 +101,7 @@ cd ${PRODUCT_DIR}/lib sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new mv -f libmed.la.new libmed.la tmp="" -if [ -n ${HDF5HOME} ]; then +if [ -n "${HDF5HOME}" ]; then tmp="-L${HDF5HOME}/lib" fi sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new diff --git a/config_files/med-2.2.2.sh b/config_files/med-2.2.2.sh index 85cf5b7..3f5142e 100755 --- a/config_files/med-2.2.2.sh +++ b/config_files/med-2.2.2.sh @@ -83,7 +83,7 @@ mv -f libmed.la.new libmed.la sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmedC.la > libmedC.la.new mv -f libmedC.la.new libmedC.la tmp="" -if [ -n ${HDF5HOME} ]; then +if [ -n "${HDF5HOME}" ]; then tmp="-L${HDF5HOME}/lib" fi sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new @@ -113,7 +113,7 @@ mv -f libmed.la.new libmed.la sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new mv -f libmedC.la.new libmedC.la tmp="" -if [ -n ${HDF5HOME} ]; then +if [ -n "${HDF5HOME}" ]; then tmp="-L${HDF5HOME}/lib" fi sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new diff --git a/config_files/sip-3.3.2.sh b/config_files/sip-3.3.2.sh index d37a97e..181d820 100755 --- a/config_files/sip-3.3.2.sh +++ b/config_files/sip-3.3.2.sh @@ -37,7 +37,7 @@ if [ -n "${sipdir}" ] ; then if [ -z "${sippython}" ] ; then sippython="`find_in_path libsip.so.9.1.0 /usr/lib/python${python_version}/site-packages`" fi - if [ -n ${sippython} ]; then + if [ -n "${sippython}" ]; then tmp="${sipdir} ${sipdir} \${PATH} ${PATH}"; path=`sort_path ${tmp}` tmp="${sipdir} ${sipdir} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; diff --git a/config_files/sip-4.1.sh b/config_files/sip-4.1.sh index 64c64ee..1d5a082 100755 --- a/config_files/sip-4.1.sh +++ b/config_files/sip-4.1.sh @@ -37,7 +37,7 @@ if [ -n "${sipdir}" ] ; then if [ -z "${sippython}" ] ; then sippython="`find_in_path sip.so /usr/lib/python${python_version}/site-packages`" fi - if [ -n ${sippython} ]; then + if [ -n "${sippython}" ]; then tmp="${sipdir} ${sipdir} \${PATH} ${PATH}"; path=`sort_path ${tmp}` tmp="${sipdir} ${sipdir} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; -- 2.39.2