From: Ramsay Jones Date: Tue, 21 Dec 2010 18:50:47 +0000 (+0000) Subject: t3419-*.sh: Fix arithmetic expansion syntax error X-Git-Tag: v1.7.4-rc0~3^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=00f66f0e4913110e19972a71a150a7b9d1bfd02f;p=git.git t3419-*.sh: Fix arithmetic expansion syntax error Some shells, for example dash versions older than 0.5.4, need to spell a variable reference as '$N' rather than 'N' in an arithmetic expansion. In order to avoid the syntax error, we change the offending variable reference from 'i' to '$i' in function scramble. There is nothing bash specific to this test script (and we shouldn't have any bash dependent test). Fix its shebang line. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- diff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh index 1aee48351..bd8efaf00 100755 --- a/t/t3419-rebase-patch-id.sh +++ b/t/t3419-rebase-patch-id.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh test_description='git rebase - test patch id computation' @@ -27,7 +27,7 @@ scramble() then echo "$x" fi - i=$(((i+1) % 10)) + i=$((($i+1) % 10)) done < "$1" > "$1.new" mv -f "$1.new" "$1" }