[gedit-plugins] Just use shell syntax for a check to avoid portability issues.



commit 2b5d7298e3acc4a82c72aff21e7fb36a308d08f0
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Apr 10 14:32:34 2011 +0200

    Just use shell syntax for a check to avoid portability issues.

 configure.ac |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e723671..87ed08a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,12 +178,14 @@ disabled_plugins=
 # Plugin specific checks
 # ================================================================
 check_plugin_defined() {
-	if echo "$2" | egrep "\b($1)\b" > /dev/null;
-	then
-		return 1
-	else
-		return 0
-	fi
+	for p in $2
+	do
+		if test "$p" = "$1"
+		then
+			return 1
+		fi
+	done
+	return 0
 }
 
 plugin_defined() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]