Add notice of inclusion of third-party code

(imported from commit 62d141e6ebd3368bd1cb3154d6903f9408f2b77c)
This commit is contained in:
Zev Benjamin 2013-05-28 15:58:14 -04:00
parent 3e19afc95f
commit 6e0a5e0293
2 changed files with 19 additions and 0 deletions

View File

@ -4,6 +4,11 @@
cd "$(dirname "$0")"/..
if ! which sponge >/dev/null; then
echo 'Install the moreutils package.' >&2
exit 1
fi
# Redirect output to a log file (most recent run only)
exec >update-prod-static.log
@ -27,6 +32,11 @@ rm -rf prod-static/serve-new
mkdir -p prod-static/serve-new
cp -r prod-static/collected/{favicon.ico,robots.txt,html,images,third,min,audio} prod-static/serve-new/
# Prepend the third-party code notice to JavaScript and CSS files.
for f in prod-static/serve-new/min/*.{js,css}; do
cat zephyr/static/header.txt $f | sponge $f
done
# Sync the new directory to the one nginx actually serves.
# Hopefully this doesn't race too badly for clients loading
# right as a deploy happens.

9
zephyr/static/header.txt Normal file
View File

@ -0,0 +1,9 @@
/*
Some of the software provided in this file may be offered under an open source
license. If some of the software in this file is offered under an open source
license, information about that license will appear in this file.
All other software provided in this file is
Copyright (c) 2012-2013 Humbug, Inc. and is provided under the license
described in the Humbug Terms of Service: https://humbughq.com/terms
*/