Skip to content

Commit c217e26

Browse files
devzero2000patthoyts
authored andcommitted
git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
1 parent 82b2cab commit c217e26

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

po/glossary/txt-to-pot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if [ $# -eq 0 ]
1212
then
1313
cat <<!
14-
Usage: `basename $0` git-gui-glossary.txt > git-gui-glossary.pot
14+
Usage: $(basename $0) git-gui-glossary.txt > git-gui-glossary.pot
1515
!
1616
exit 1;
1717
fi
@@ -33,7 +33,7 @@ cat <<!
3333
msgid ""
3434
msgstr ""
3535
"Project-Id-Version: PACKAGE VERSION\n"
36-
"POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\n"
36+
"POT-Creation-Date: $(date +'%Y-%m-%d %H:%M%z')\n"
3737
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
3838
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
3939
"Language-Team: LANGUAGE <LL@li.org>\n"

0 commit comments

Comments
 (0)