Update magic gen-docs script to not mangle Perl repo links
This commit is contained in:
parent
95fea3694b
commit
f81dcb36a6
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
## Issues
|
||||
|
||||
If you have any questions about the image, please contact us %%MAILING_LIST%% through a [GitHub issue](https://github.com/docker-library/%%REPO%%/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
||||
If you have any questions about the image, please contact us %%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you want to contribute new features or updates, we are always thrilled to receive pull requests, and do our best to process them as fast as possible.
|
||||
|
||||
We recommend discussing your plans %%MAILING_LIST%% through a [GitHub issue](https://github.com/docker-library/%%REPO%%/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||
We recommend discussing your plans %%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||
|
|
|
|||
13
gen-docs.sh
13
gen-docs.sh
|
|
@ -10,6 +10,14 @@ fi
|
|||
repos=( "${repos[@]%/}" )
|
||||
|
||||
for repo in "${repos[@]}"; do
|
||||
case "$repo" in
|
||||
perl)
|
||||
gitRepo="https://github.com/Perl/docker-perl"
|
||||
;;
|
||||
*)
|
||||
gitRepo="https://github.com/docker-library/$repo"
|
||||
;;
|
||||
esac
|
||||
if [ -e "$repo/README-content.md" ]; then
|
||||
mailingList="$(cat "$repo/mailing-list.md" 2>/dev/null | sed 's/[\/&]/\\&/g' || true)"
|
||||
if [ "$mailingList" ]; then
|
||||
|
|
@ -22,7 +30,10 @@ for repo in "${repos[@]}"; do
|
|||
echo "cat $repo/README-content.md README-footer.md > $repo/README.md"
|
||||
cat "$repo/README-content.md" "README-footer.md" > "$repo/README.md"
|
||||
set -x
|
||||
sed -ri 's/\s*%%MAILING_LIST%%\s*/'"$mailingList"'/g; s/%%REPO%%/'"$repo"'/g' "$repo/README.md"
|
||||
sed -ri '
|
||||
s/\s*%%MAILING_LIST%%\s*/'"$mailingList"'/g;
|
||||
s!%%REPO%%!'"$gitRepo"'!g;
|
||||
' "$repo/README.md"
|
||||
)
|
||||
else
|
||||
echo "skipping $repo: repo/README-content.md"
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ For many single file projects, it may not be convenient to write a `Dockerfile`
|
|||
|
||||
## Issues
|
||||
|
||||
If you have any questions about the image, please contact us through a [GitHub issue](https://github.com/Perl/perl/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
||||
If you have any questions about the image, please contact us through a [GitHub issue](https://github.com/Perl/docker-perl/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you want to contribute new features or updates, we are always thrilled to receive pull requests, and do our best to process them as fast as possible.
|
||||
|
||||
We recommend discussing your plans through a [GitHub issue](https://github.com/Perl/perl/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||
We recommend discussing your plans through a [GitHub issue](https://github.com/Perl/docker-perl/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||
|
|
|
|||
Loading…
Reference in New Issue