gather-licenses.sh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. LICENSE_FILES=(
  4. 'angular' 'node_modules/angular/LICENSE.md'
  5. 'angular-animate' 'node_modules/angular-animate/LICENSE.md'
  6. 'angular-aria' 'node_modules/angular-aria/LICENSE.md'
  7. 'angular-inview' 'node_modules/angular-inview/LICENSE'
  8. 'angular-material' 'node_modules/angular-material/LICENSE'
  9. 'angular-messages' 'node_modules/angular-messages/LICENSE.md'
  10. 'angular-qrcode' '.licenses/angular-qrcode'
  11. 'angular-route' 'node_modules/angular-route/LICENSE.md'
  12. 'angular-sanitize' 'node_modules/angular-sanitize/LICENSE.md'
  13. 'angular-translate' 'node_modules/angular-translate/LICENSE'
  14. 'angular-ui-router' 'node_modules/angular-ui-router/LICENSE'
  15. 'angularjs-scroll-glue' '.licenses/angularjs-scroll-glue'
  16. 'autolinker' 'node_modules/autolinker/LICENSE'
  17. 'babel-es6-polyfill' '.licenses/babel-es6-polyfill'
  18. 'babel-preset-es2015' '.licenses/babel-preset-es2015'
  19. 'babelify' 'node_modules/babelify/LICENSE'
  20. 'browserify' 'node_modules/browserify/LICENSE'
  21. 'browserify-header' '.licenses/browserify-header'
  22. 'croppie' 'node_modules/croppie/LICENSE'
  23. 'file-saver' 'node_modules/file-saver/LICENSE.md'
  24. 'js-sha256' 'node_modules/js-sha256/LICENSE.txt'
  25. 'messageformat' 'node_modules/messageformat/LICENSE'
  26. 'msgpack-lite' 'node_modules/msgpack-lite/LICENSE'
  27. 'node-sass' 'node_modules/node-sass/LICENSE'
  28. 'saltyrtc-client' 'node_modules/saltyrtc-client/LICENSE.md'
  29. 'saltyrtc-task-webrtc' 'node_modules/saltyrtc-task-webrtc/LICENSE.md'
  30. 'tsify' '.licenses/tsify'
  31. 'tweetnacl' 'node_modules/tweetnacl/LICENSE'
  32. 'typescript' 'node_modules/typescript/LICENSE.txt'
  33. 'webrtc-adapter' 'node_modules/webrtc-adapter/LICENSE.md'
  34. )
  35. FILE=LICENSE-3RD-PARTY.txt
  36. echo -e "Licenses for third party libraries in Threema Web:\n\n\n\n" > $FILE
  37. for i in ${!LICENSE_FILES[@]}; do
  38. if (( $i % 2 == 0 )); then
  39. echo -e "----------" >> $FILE
  40. echo -e "License for ${LICENSE_FILES[$i]}" >> $FILE
  41. echo -e "----------\n" >> $FILE
  42. else
  43. cat "${LICENSE_FILES[$i]}" >> $FILE
  44. echo -e "\n\n\n" >> $FILE
  45. fi
  46. done