gather-licenses.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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-qrcode' '.licenses/angular-qrcode'
  10. 'angular-route' 'node_modules/angular-route/LICENSE.md'
  11. 'angular-sanitize' 'node_modules/angular-sanitize/LICENSE.md'
  12. 'angular-translate' 'node_modules/angular-translate/LICENSE'
  13. 'angular-ui-router' 'node_modules/@uirouter/angularjs/LICENSE'
  14. 'angularjs-scroll-glue' '.licenses/angularjs-scroll-glue'
  15. 'autolinker' 'node_modules/autolinker/LICENSE'
  16. 'babelify' 'node_modules/babelify/LICENSE'
  17. 'browserify' 'node_modules/browserify/LICENSE'
  18. 'browserify-header' '.licenses/browserify-header'
  19. 'croppie' 'node_modules/croppie/LICENSE'
  20. 'EmojiOne JS' '.licenses/emojione-js'
  21. 'EmojiOne Artwork' '.licenses/emojione-artwork'
  22. 'file-saver' 'node_modules/file-saver/LICENSE.md'
  23. 'messageformat' 'node_modules/messageformat/LICENSE'
  24. 'msgpack-lite' 'node_modules/msgpack-lite/LICENSE'
  25. 'node-sass' 'node_modules/node-sass/LICENSE'
  26. 'saltyrtc-client' 'node_modules/@saltyrtc/client/LICENSE.md'
  27. 'saltyrtc-task-webrtc' 'node_modules/@saltyrtc/task-webrtc/LICENSE.md'
  28. 'ts-events' 'node_modules/ts-events/LICENSE'
  29. 'tsify' '.licenses/tsify'
  30. 'tweetnacl' 'node_modules/tweetnacl/LICENSE'
  31. 'typescript' 'node_modules/typescript/LICENSE.txt'
  32. 'webrtc-adapter' 'node_modules/webrtc-adapter/LICENSE.md'
  33. )
  34. FILE=LICENSE-3RD-PARTY.txt
  35. echo -e "Licenses for third party libraries in Threema Web:\n\n\n\n" > $FILE
  36. for i in ${!LICENSE_FILES[@]}; do
  37. if (( $i % 2 == 0 )); then
  38. echo -e "----------" >> $FILE
  39. echo -e "License for ${LICENSE_FILES[$i]}" >> $FILE
  40. echo -e "----------\n" >> $FILE
  41. else
  42. cat "${LICENSE_FILES[$i]}" >> $FILE
  43. echo -e "\n\n\n" >> $FILE
  44. fi
  45. done