gather-licenses.sh 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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' 'public/libs/angular-inview/LICENSE'
  8. 'angularjs-scroll-glue' 'node_modules/angularjs-scroll-glue/src/LICENSE'
  9. 'angular-material' 'node_modules/angular-material/LICENSE'
  10. 'angular-messages' 'node_modules/angular-messages/LICENSE.md'
  11. 'angular-qrcode' 'node_modules/angular-qrcode/LICENCE.txt'
  12. 'angular-route' 'node_modules/angular-route/LICENSE.md'
  13. 'angular-sanitize' 'node_modules/angular-sanitize/LICENSE.md'
  14. 'angular-translate' 'node_modules/angular-translate/LICENSE'
  15. 'angular-ui-router' 'node_modules/@uirouter/angularjs/LICENSE'
  16. 'autolinker' 'node_modules/autolinker/LICENSE'
  17. 'babel' 'node_modules/@babel/core/LICENSE'
  18. 'babel-polyfill' 'node_modules/@babel/polyfill/LICENSE'
  19. 'babel-preset-env' 'node_modules/@babel/preset-env/LICENSE'
  20. 'babelify' 'node_modules/babelify/LICENSE'
  21. 'browserify' 'node_modules/browserify/LICENSE'
  22. 'browserify-header' '.licenses/browserify-header'
  23. 'croppie' 'node_modules/croppie/LICENSE'
  24. 'Twemoji' '.licenses/twemoji'
  25. 'file-saver' 'node_modules/file-saver/LICENSE.md'
  26. 'messageformat' 'node_modules/messageformat/LICENSE'
  27. 'msgpack-lite' 'node_modules/msgpack-lite/LICENSE'
  28. 'node-sass' 'node_modules/node-sass/LICENSE'
  29. 'saltyrtc-client' 'node_modules/@saltyrtc/client/LICENSE.md'
  30. 'saltyrtc-task-relayed-data' 'node_modules/@saltyrtc/task-relayed-data/LICENSE.md'
  31. 'saltyrtc-task-webrtc' 'node_modules/@saltyrtc/task-webrtc/LICENSE.md'
  32. 'sdp' 'node_modules/sdp/LICENSE'
  33. 'ts-events' 'node_modules/ts-events/LICENSE'
  34. 'tsify' '.licenses/tsify'
  35. 'tweetnacl' 'node_modules/tweetnacl/LICENSE'
  36. 'typescript' 'node_modules/typescript/LICENSE.txt'
  37. 'webrtc-adapter' 'node_modules/webrtc-adapter/LICENSE.md'
  38. )
  39. FILE=LICENSE-3RD-PARTY.txt
  40. echo -e "Licenses for third party libraries in Threema Web:\n\n\n\n" > $FILE
  41. for i in ${!LICENSE_FILES[@]}; do
  42. if (( $i % 2 == 0 )); then
  43. echo -e "----------" >> $FILE
  44. echo -e "License for ${LICENSE_FILES[$i]}" >> $FILE
  45. echo -e "----------\n" >> $FILE
  46. else
  47. cat "${LICENSE_FILES[$i]}" >> $FILE
  48. echo -e "\n\n\n" >> $FILE
  49. fi
  50. done