[mutter] Elimitate use of arithmetic expansion for portability



commit da934be354e4f438d57f84d61138cd930ad5d7cd
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Aug 4 11:16:20 2009 -0400

    Elimitate use of arithmetic expansion for portability
    
    Use expr rather than $(( <arithmetic> )) - this is needed at least
    for the default Solaris shell.
    
    Based on patch by Halton Huo
    http://bugzilla.gnome.org/show_bug.cgi?id=590719

 configure.in |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index b843a68..f758628 100644
--- a/configure.in
+++ b/configure.in
@@ -540,9 +540,10 @@ mutter-$VERSION:
 	Xcursor:                  ${have_xcursor}
 "
 
+
 MUTTER_MINOR_VERSION=mutter_minor_version
-if test $(( $(echo $MUTTER_MINOR_VERSION) %2)) == "1"; then
-   stable_version=$(( ($MUTTER_MINOR_VERSION / 2) * 2))
+if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
+   stable_version=`expr $MUTTER_MINOR_VERSION - 1`
    echo "This is the UNSTABLE branch of mutter"
    echo -n "Use 2.$stable_version.x for stable "
    echo    "(gnome-2-$stable_version branch in Subversion)"



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