[gobject-introspection] gi-tester: Don't use negative substring parameters



commit aa14e97260f1b9e0750d2972f25ff124dde6617a
Author: Davide Bertola <dade dadeb it>
Date:   Thu Feb 13 10:07:53 2014 +0100

    gi-tester: Don't use negative substring parameters
    
    Bash from OSX 10.9 seems not to support them.

 tests/gi-tester |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/gi-tester b/tests/gi-tester
index a7be690..51199dd 100755
--- a/tests/gi-tester
+++ b/tests/gi-tester
@@ -9,7 +9,9 @@ targetbase=${targetname##*/}
 
 case $targetname in
 *.gir)
-    diff -u -U 10 ${srcdir}/${targetname::-4}-expected.gir ${builddir}/${targetname}
+    len=${#targetname}
+    limit=$(expr $len - 4)
+    diff -u -U 10 ${srcdir}/${targetname:0:${limit}}-expected.gir ${builddir}/${targetname}
     exit $?
     ;;
 *.typelib)


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