gather-licenses.sh 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. 'angular-material' 'node_modules/angular-material/LICENSE'
  9. 'angular-messages' 'node_modules/angular-messages/LICENSE.md'
  10. 'angular-qrcode' 'node_modules/angular-qrcode/LICENCE.txt'
  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/@uirouter/angularjs/LICENSE'
  15. 'angularjs-scroll-glue' 'node_modules/angularjs-scroll-glue/src/LICENSE'
  16. 'autolinker' 'node_modules/autolinker/LICENSE'
  17. 'babel-runtime' 'node_modules/@babel/runtime/LICENSE'
  18. 'croppie' 'node_modules/croppie/LICENSE'
  19. 'emojibase-regex' 'node_modules/emojibase-regex/LICENSE'
  20. 'file-saver' 'node_modules/file-saver/LICENSE.md'
  21. 'messageformat' 'node_modules/messageformat/LICENSE'
  22. 'msgpack-lite' 'node_modules/msgpack-lite/LICENSE'
  23. 'node-sass' 'node_modules/node-sass/LICENSE'
  24. 'saltyrtc-client' 'node_modules/@saltyrtc/client/LICENSE.md'
  25. 'saltyrtc-task-relayed-data' 'node_modules/@saltyrtc/task-relayed-data/LICENSE.md'
  26. 'saltyrtc-task-webrtc' 'node_modules/@saltyrtc/task-webrtc/LICENSE.md'
  27. 'sdp' 'node_modules/sdp/LICENSE'
  28. 'ts-events' 'node_modules/ts-events/LICENSE'
  29. 'ts-loader' 'node_modules/ts-loader/LICENSE'
  30. 'ts-log' 'node_modules/ts-log/LICENSE'
  31. 'tweetnacl' 'node_modules/tweetnacl/LICENSE'
  32. 'twemoji' '.licenses/twemoji'
  33. 'typescript' 'node_modules/typescript/LICENSE.txt'
  34. 'webrtc-adapter' 'node_modules/webrtc-adapter/LICENSE.md'
  35. )
  36. FILE=LICENSE-3RD-PARTY.txt
  37. echo -e "Licenses for third party libraries in Threema Web:\n\n\n\n" > $FILE
  38. for i in ${!LICENSE_FILES[@]}; do
  39. if (( $i % 2 == 0 )); then
  40. echo -e "----------" >> $FILE
  41. echo -e "License for ${LICENSE_FILES[$i]}" >> $FILE
  42. echo -e "----------\n" >> $FILE
  43. else
  44. cat "${LICENSE_FILES[$i]}" >> $FILE
  45. echo -e "\n\n\n" >> $FILE
  46. fi
  47. done