lilypond-devel
[Top][All Lists]
Advanced

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

Change all occurences of "echo -n" to "printf" for portability (issue 59


From: dak
Subject: Change all occurences of "echo -n" to "printf" for portability (issue 5903046)
Date: Sat, 24 Mar 2012 06:00:52 +0000


http://codereview.appspot.com/5903046/diff/1/scripts/build/install-info-html.sh
File scripts/build/install-info-html.sh (right):

http://codereview.appspot.com/5903046/diff/1/scripts/build/install-info-html.sh#newcode129
scripts/build/install-info-html.sh:129: printf "$name: Writing index:
$index_file..."
This is dangerous since $name could contain print control characters.
So one should rather write
printf "%s: Writing index: %s..." "$name" "$index_file..."

http://codereview.appspot.com/5903046/diff/1/smart-autogen.sh
File smart-autogen.sh (right):

http://codereview.appspot.com/5903046/diff/1/smart-autogen.sh#newcode16
smart-autogen.sh:16: printf $AUTOGEN_INPUT_CHECKSUM > $CHECKSUM_FILE
I'd prefer "%s" "$AUTOGEN_INPUT_CHECKSUM" here too in order to avoid
teaching sloppy use of printf, but it can't actually do harm here since
md5sum does not produce backslashes or percent characters.

http://codereview.appspot.com/5903046/diff/1/smart-configure.sh
File smart-configure.sh (right):

http://codereview.appspot.com/5903046/diff/1/smart-configure.sh#newcode19
smart-configure.sh:19: printf $CONFIGURE_CHECKSUM >
$CONFIGURE_CHECKSUM_FILE
See last comment.

http://codereview.appspot.com/5903046/diff/1/stepmake/bin/stepmakeise.sh
File stepmake/bin/stepmakeise.sh (right):

http://codereview.appspot.com/5903046/diff/1/stepmake/bin/stepmakeise.sh#newcode37
stepmake/bin/stepmakeise.sh:37: printf "Checking version..."
Good enough: literal string without control or format characters is
harmless.

http://codereview.appspot.com/5903046/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]