From f81dcb36a647ce232fd007d711ff5508b0fcde21 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 8 Sep 2014 17:25:47 -0600 Subject: [PATCH] Update magic gen-docs script to not mangle Perl repo links --- README-footer.md | 4 ++-- gen-docs.sh | 13 ++++++++++++- perl/README.md | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README-footer.md b/README-footer.md index 8137e72b2..3aa10d7ba 100644 --- a/README-footer.md +++ b/README-footer.md @@ -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. diff --git a/gen-docs.sh b/gen-docs.sh index 5b31c3657..a0160dc4b 100755 --- a/gen-docs.sh +++ b/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" diff --git a/perl/README.md b/perl/README.md index 3cd524e51..3359140d4 100644 --- a/perl/README.md +++ b/perl/README.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.