From 17fbc4c986f01fd1f56651ba02f2668012cfe7de Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 17 Sep 2014 23:21:59 -0600 Subject: [PATCH] Add license support to REAMDE-template.md and update.sh --- README-template.md | 2 +- clojure/README.md | 5 +++++ golang/README.md | 5 +++++ hylang/README.md | 5 +++++ perl/README.md | 5 +++++ php/README.md | 5 +++++ ruby/README.md | 5 +++++ update.sh | 7 +++++++ 8 files changed, 38 insertions(+), 1 deletion(-) diff --git a/README-template.md b/README-template.md index 4f40e5da5..b23cb6d4f 100644 --- a/README-template.md +++ b/README-template.md @@ -2,7 +2,7 @@ %%TAGS%% -%%CONTENT%% +%%CONTENT%%%%LICENSE%% # User Feedback diff --git a/clojure/README.md b/clojure/README.md index 5e77155c4..78bd86443 100644 --- a/clojure/README.md +++ b/clojure/README.md @@ -63,6 +63,11 @@ compile your project into a jar from a container: This will build your project into a jar file located in your project's `target/uberjar` directory. +# License + +View [license information](http://clojure.org/license) +for the software contained in this image. + # User Feedback ## Issues diff --git a/golang/README.md b/golang/README.md index c9f627b21..0d494369e 100644 --- a/golang/README.md +++ b/golang/README.md @@ -79,6 +79,11 @@ Alternatively, you can build for multiple platforms at once: > done > done +# License + +View [license information](http://golang.org/LICENSE) +for the software contained in this image. + # User Feedback ## Issues diff --git a/hylang/README.md b/hylang/README.md index 0f18bc401..735e595c4 100644 --- a/hylang/README.md +++ b/hylang/README.md @@ -36,6 +36,11 @@ Docker image directly: docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp hylang:0.10 hy your-daemon-or-script.hy +# License + +View [license information](https://github.com/hylang/hy/blob/master/LICENSE) +for the software contained in this image. + # User Feedback ## Issues diff --git a/perl/README.md b/perl/README.md index 1cdc3b2c1..6bb801867 100644 --- a/perl/README.md +++ b/perl/README.md @@ -35,6 +35,11 @@ Perl Docker image directly: docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp perl:5.20 perl your-daemon-or-script.pl +# License + +View [license information](http://dev.perl.org/licenses/) +for the software contained in this image. + # User Feedback ## Issues diff --git a/php/README.md b/php/README.md index 3be1b30f9..5f6b9e2f1 100644 --- a/php/README.md +++ b/php/README.md @@ -70,6 +70,11 @@ do the following: docker run -it --rm --name my-apache-php-app -v "$(pwd)":/var/www/html php:5.6-apache +# License + +View [license information](http://php.net/license/) +for the software contained in this image. + # User Feedback ## Issues diff --git a/ruby/README.md b/ruby/README.md index b2124a53a..98ceeea42 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -41,6 +41,11 @@ Ruby Docker image directly: docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ruby:2.1.2 ruby your-daemon-or-script.rb +# License + +View [license information](https://www.ruby-lang.org/en/about/license.txt) +for the software contained in this image. + # User Feedback ## Issues diff --git a/update.sh b/update.sh index ff4f27329..3dfd8dd88 100755 --- a/update.sh +++ b/update.sh @@ -44,6 +44,10 @@ for repo in "${repos[@]}"; do else mailingList=' ' fi + license="$(cat "$repo/license.md" 2>/dev/null || true)" + if [ "$license" ]; then + license=$'\n\n''# License'$'\n\n'"$license" + fi cp -v README-template.md "$repo/README.md" @@ -53,6 +57,9 @@ for repo in "${repos[@]}"; do echo ' CONTENT => '"$repo"'/README-content.md' replace_field "$repo" 'CONTENT' "$(cat "$repo/README-content.md")" + echo ' LICENSE => '"$repo"'/license.md' + replace_field "$repo" 'LICENSE' "$license" + echo ' MAILING_LIST => "'"$mailingList"'"' replace_field "$repo" 'MAILING_LIST' "$mailingList" '\s*'