[39795] contrib/select/select.sh

raimue at macports.org raimue at macports.org
Thu Sep 4 17:21:05 PDT 2008


Revision: 39795
          http://trac.macports.org/changeset/39795
Author:   raimue at macports.org
Date:     2008-09-04 17:21:04 -0700 (Thu, 04 Sep 2008)
Log Message:
-----------
contrib/select/select.sh:
Fix string compares, see #14452

Modified Paths:
--------------
    contrib/select/select.sh

Modified: contrib/select/select.sh
===================================================================
--- contrib/select/select.sh	2008-09-05 00:17:57 UTC (rev 39794)
+++ contrib/select/select.sh	2008-09-05 00:21:04 UTC (rev 39795)
@@ -82,7 +82,7 @@
 # test if a particular version is available
 version_is_valid() {
 	for version in $(ls -1 ${CONFPATH} | grep -v base); do
-		if [ ${1} == ${version} ]; then
+		if [ "${1}" == "${version}" ]; then
 			return 0
 		fi
 	done
@@ -91,14 +91,14 @@
 
 # perform an action (command) or just display it
 action() {
-	if [ "rm" == ${1} ]; then
-		if [ 1 == ${noexec} ]; then
+	if [ "rm" == "${1}" ]; then
+		if [ 1 == "${noexec}" ]; then
 			echo "rm -f ${2}"
 		else
 			rm -f ${2}
 		fi
-	elif [ "ln" == ${1} ]; then
-		if [ 1 == ${noexec} ]; then
+	elif [ "ln" == "${1}" ]; then
+		if [ 1 == "${noexec}" ]; then
 			echo "ln -sf ${2} ${3}"
 		else
 			ln -sf ${2} ${3}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080904/fce6c430/attachment.html 


More information about the macports-changes mailing list