[geany/geany] ca21a8: Don't use "echo -n" in shell scripts
Jiří Techet
git-noreply at xxxxx
Sun Feb 8 10:31:42 UTC 2015
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Sun, 08 Feb 2015 10:31:42 UTC
Commit: ca21a8759aada71a8f083ef8fc528bfb8988bc89
https://github.com/geany/geany/commit/ca21a8759aada71a8f083ef8fc528bfb8988bc89
Log Message:
-----------
Don't use "echo -n" in shell scripts
The standard says:
If the first operand is -n, or if any of the operands contain a
backslash ( '\' ) character, the results are implementation-defined.
On OS X it simply prints the "-n" string and everything which follows,
including the newline.
Use printf instead.
Modified Paths:
--------------
m4/geany-status.m4
po/intl_stats.sh
Modified: m4/geany-status.m4
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -27,7 +27,7 @@ EOF
# Print a nice top bar
# description + ' : ' + value
total=`expr $dlen + 3 + $vlen`
- for i in `seq 1 $total`; do echo -n '-'; done
+ for i in `seq 1 $total`; do printf '-'; done
echo
# And print the actual content
Modified: po/intl_stats.sh
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -92,7 +92,7 @@ else
do
# maybe the regexp can be optimized, regexps are not my best friends
creationdate=`grep "PO-Revision-Date:" po/$lang.po | sed 's/.*: \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\} [0-9]\{2\}:[0-9]\{2\}[+|-][0-9]\{4\}\).*/\1/'`
- echo -n $eswitch $lang"\t("$creationdate"):\t"
+ printf "%s %s\t(%s):\t" "$eswitch" "$lang" "$creationdate"
msgfmt --check --statistics po/$lang.po;
done
fi
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list