Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 2c4a050

Browse files
devzero2000gitster
authored andcommitted
install-webdoc.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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f25f5e6 commit 2c4a050

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/install-webdoc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ do
1818
else
1919
echo >&2 "# install $h $T/$h"
2020
rm -f "$T/$h"
21-
mkdir -p `dirname "$T/$h"`
21+
mkdir -p $(dirname "$T/$h")
2222
cp "$h" "$T/$h"
2323
fi
2424
done
25-
strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
25+
strip_leading=$(echo "$T/" | sed -e 's|.|.|g')
2626
for th in \
2727
"$T"/*.html "$T"/*.txt \
2828
"$T"/howto/*.txt "$T"/howto/*.html \
2929
"$T"/technical/*.txt "$T"/technical/*.html
3030
do
31-
h=`expr "$th" : "$strip_leading"'\(.*\)'`
31+
h=$(expr "$th" : "$strip_leading"'\(.*\)')
3232
case "$h" in
3333
RelNotes-*.txt | index.html) continue ;;
3434
esac

0 commit comments

Comments
 (0)