Pārlūkot izejas kodu

Add license support to REAMDE-template.md and update.sh

Tianon Gravi 11 gadi atpakaļ
vecāks
revīzija
17fbc4c986
8 mainītis faili ar 38 papildinājumiem un 1 dzēšanām
  1. 1 1
      README-template.md
  2. 5 0
      clojure/README.md
  3. 5 0
      golang/README.md
  4. 5 0
      hylang/README.md
  5. 5 0
      perl/README.md
  6. 5 0
      php/README.md
  7. 5 0
      ruby/README.md
  8. 7 0
      update.sh

+ 1 - 1
README-template.md

@@ -2,7 +2,7 @@
 
 
 %%TAGS%%
 %%TAGS%%
 
 
-%%CONTENT%%
+%%CONTENT%%%%LICENSE%%
 
 
 # User Feedback
 # User Feedback
 
 

+ 5 - 0
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
 This will build your project into a jar file located in your project's
 `target/uberjar` directory.
 `target/uberjar` directory.
 
 
+# License
+
+View [license information](http://clojure.org/license)
+for the software contained in this image.
+
 # User Feedback
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 5 - 0
golang/README.md

@@ -79,6 +79,11 @@ Alternatively, you can build for multiple platforms at once:
     >   done
     >   done
     > done
     > done
 
 
+# License
+
+View [license information](http://golang.org/LICENSE)
+for the software contained in this image.
+
 # User Feedback
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 5 - 0
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
     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
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 5 - 0
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
     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
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 5 - 0
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
     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
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 5 - 0
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
     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
 # User Feedback
 
 
 ## Issues
 ## Issues

+ 7 - 0
update.sh

@@ -44,6 +44,10 @@ for repo in "${repos[@]}"; do
 		else
 		else
 			mailingList=' '
 			mailingList=' '
 		fi
 		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"
 		cp -v README-template.md "$repo/README.md"
 		
 		
@@ -53,6 +57,9 @@ for repo in "${repos[@]}"; do
 		echo '  CONTENT => '"$repo"'/README-content.md'
 		echo '  CONTENT => '"$repo"'/README-content.md'
 		replace_field "$repo" 'CONTENT' "$(cat "$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"'"'
 		echo '  MAILING_LIST => "'"$mailingList"'"'
 		replace_field "$repo" 'MAILING_LIST' "$mailingList" '\s*'
 		replace_field "$repo" 'MAILING_LIST' "$mailingList" '\s*'