remote-hg: improve basic test
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Aug 2013 19:23:10 +0000 (14:23 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Aug 2013 18:40:55 +0000 (11:40 -0700)
It appears 'let' is not present in all shells.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-hg.sh
index 94b0bba82579883a89de24aa25e78ef5be1f0bf7..5a6f7451babe71871a8363bb3b21dc1d5b690825 100755 (executable)
@@ -75,10 +75,10 @@ check_push () {
                        grep "^   [a-f0-9]*\.\.[a-f0-9]* *${branch} -> ${branch}$" error || ref_ret=1
                        ;;
                esac
-               let 'ref_ret' && echo "match for '$branch' failed" && break
+               test $ref_ret -ne 0 && echo "match for '$branch' failed" && break
        done
 
-       if let 'expected_ret != ret || ref_ret'
+       if test $expected_ret -ne $ret -o $ref_ret -ne 0
        then
                return 1
        fi