summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-11-02 14:17:51 -0400
committerJunio C Hamano <gitster@pobox.com>2016-11-02 19:36:29 -0700
commitcbb6707b1187392c9106a8c5405d1413f2db69d0 (patch)
tree9e158a8b390609e7c04d3969cceca94ae510c8b5
parent0f71fa273fc6c352a266894f1f757c5950230d9b (diff)
downloadgit-cbb6707b1187392c9106a8c5405d1413f2db69d0.tar.gz
t0021: use write_script to create rot13 shell script
This avoids us fooling around with $SHELL_PATH and the executable bit ourselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t0021-conversion.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index a20b9f58e3..dfde225491 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -6,13 +6,11 @@ test_description='blob conversion via gitattributes'
TEST_ROOT="$(pwd)"
-cat <<EOF >"$TEST_ROOT/rot13.sh"
-#!$SHELL_PATH
+write_script <<\EOF "$TEST_ROOT/rot13.sh"
tr \
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
EOF
-chmod +x "$TEST_ROOT/rot13.sh"
generate_random_characters () {
LEN=$1