| The notice.php file leverages the notice.html file to display the SUA. |
| |
| That content is repeated in the feature.properties.txt file. |
| We do not have an easy means to dynamically generate that file based on |
| the contents from notice.html, so--in the event that the notice.html content |
| is changed--the feature.properties.txt file must also be updated. |
| |
| The static content can be generated using the following script. |
| |
| # Convert the HTML document into plaintext, use sed to strip leading |
| # blank lines (pandoc adds a leading blank line). |
| pandoc -f html -t plain --columns=80 notice.html | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' > notice.txt |
| # Use AWK to add "\n\" to the end of all lines. |
| awk '$0=$0"\\n\\"' < notice.txt > notice.tmp |
| # Hack out the old content, replace with the new. |
| ed feature.properties.txt << EOF |
| /^license=/+1,/^######/-1d |
| .-1r notice.tmp |
| w |
| q |
| EOF |
| rm notice.tmp |
| |
| NOTE that the generation of feature.properties.txt isn't completely correct |
| The backslash on the last line of the SUA text needs to be removed. We need to |
| do some more work on the script. |