mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
![Elia Pinto](/assets/img/avatar_default.png)
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 <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
57 lines
673 B
Bash
Executable file
57 lines
673 B
Bash
Executable file
#!/bin/sh
|
|
|
|
cat <<\EOF
|
|
Git Howto Index
|
|
===============
|
|
|
|
Here is a collection of mailing list postings made by various
|
|
people describing how they use Git in their workflow.
|
|
|
|
EOF
|
|
|
|
for txt
|
|
do
|
|
title=$(expr "$txt" : '.*/\(.*\)\.txt$')
|
|
from=$(sed -ne '
|
|
/^$/q
|
|
/^From:[ ]/{
|
|
s///
|
|
s/^[ ]*//
|
|
s/[ ]*$//
|
|
s/^/by /
|
|
p
|
|
}
|
|
' "$txt")
|
|
|
|
abstract=$(sed -ne '
|
|
/^Abstract:[ ]/{
|
|
s/^[^ ]*//
|
|
x
|
|
s/.*//
|
|
x
|
|
: again
|
|
/^[ ]/{
|
|
s/^[ ]*//
|
|
H
|
|
n
|
|
b again
|
|
}
|
|
x
|
|
p
|
|
q
|
|
}' "$txt")
|
|
|
|
if grep 'Content-type: text/asciidoc' >/dev/null $txt
|
|
then
|
|
file=$(expr "$txt" : '\(.*\)\.txt$').html
|
|
else
|
|
file="$txt"
|
|
fi
|
|
|
|
echo "* link:$file[$title] $from
|
|
$abstract
|
|
|
|
"
|
|
|
|
done
|