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>
This commit is contained in:

committed by
Junio C Hamano

parent
0f71fa273f
commit
cbb6707b11
@ -6,13 +6,11 @@ test_description='blob conversion via gitattributes'
|
|||||||
|
|
||||||
TEST_ROOT="$(pwd)"
|
TEST_ROOT="$(pwd)"
|
||||||
|
|
||||||
cat <<EOF >"$TEST_ROOT/rot13.sh"
|
write_script <<\EOF "$TEST_ROOT/rot13.sh"
|
||||||
#!$SHELL_PATH
|
|
||||||
tr \
|
tr \
|
||||||
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
|
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
|
||||||
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
|
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$TEST_ROOT/rot13.sh"
|
|
||||||
|
|
||||||
generate_random_characters () {
|
generate_random_characters () {
|
||||||
LEN=$1
|
LEN=$1
|
||||||
|
Reference in New Issue
Block a user