From 9cff52c3424c03ef29734c13961360261d7c4bfc Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 21 Oct 2005 13:46:51 +0000 Subject: [PATCH] fix a bug with 'test -n' option --- config_files/Python-2.3.4.sh | 2 +- config_files/Python-2.3.5.sh | 2 +- config_files/graphviz-1.9.sh | 2 +- config_files/graphviz-2.2.1.sh | 2 +- config_files/med-2.2.2.sh | 4 ++-- config_files/sip-4.1.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) 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/Python-2.3.5.sh b/config_files/Python-2.3.5.sh index c4acec1..549c440 100755 --- a/config_files/Python-2.3.5.sh +++ b/config_files/Python-2.3.5.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+ # for Python 2.3.5 it is equal to 20305 ver=`python -V 2>&1` diff --git a/config_files/graphviz-1.9.sh b/config_files/graphviz-1.9.sh index 27799ba..4e74c4f 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.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-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