implement librejs compliance

This commit is contained in:
realaravinth
2021-11-30 18:45:02 +05:30
parent b5af9ee259
commit eedec7da34
3 changed files with 23 additions and 3 deletions

19
scripts/librejs.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
readonly DIST=static/cache/bundle/
readonly LICENSE_START="// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0"
readonly SOURCE="// @source https://github.com/mCaptcha/mCaptcha"
readonly LICENSE_END="// @license-end"
echo $LICENSE_START
echo $LICENSE_END
for file in $(find ./static/cache/bundle/ -type f -a -name "*.js")
do
contents=$(cat $file)
echo $LICENSE_START > $file
echo $SOURCE >> $file
echo $contents >> $file
echo $LICENSE_END >> $file
done