install_frontend_dependencies.sh 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/bin/bash
  2. # shellcheck disable=SC1091
  3. . bash_library.sh # source bash_library.sh
  4. # install nodjs if not installed
  5. (
  6. log "verify if nodjs is installed"
  7. dpkg -l | grep '^ii' | grep 'nodejs\s'
  8. if [ $? -eq 0 ]; then
  9. log "nodjs is installed"
  10. else
  11. log "install nodejs"
  12. sudo apt install -y curl
  13. curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  14. sudo apt install -y nodejs
  15. fi
  16. )
  17. # install Tracim Lib
  18. (
  19. log "cd frontend_lib"
  20. cd frontend_lib
  21. log "npm i"
  22. npm i
  23. log "sudo npm link"
  24. sudo npm link || exit
  25. )
  26. # install app Html Document
  27. (
  28. log "cd frontend_app_html-document"
  29. cd frontend_app_html-document
  30. log "npm i"
  31. npm i
  32. log "npm link tracim_frontend_lib"
  33. npm link tracim_frontend_lib
  34. )
  35. # install app Thread
  36. (
  37. log "cd frontend_app_thread"
  38. cd frontend_app_thread
  39. log "npm i"
  40. npm i
  41. log "npm link tracim_frontend_lib"
  42. npm link tracim_frontend_lib
  43. )
  44. # install app Workspace
  45. (
  46. log "cd frontend_app_workspace"
  47. cd frontend_app_workspace
  48. log "npm i"
  49. npm i
  50. log "npm link tracim_frontend_lib"
  51. npm link tracim_frontend_lib
  52. )
  53. # install app Admin Workspace User
  54. (
  55. log "cd frontend_app_admin_workspace_user"
  56. cd frontend_app_admin_workspace_user
  57. log "npm i"
  58. npm i
  59. log "npm link tracim_frontend_lib"
  60. npm link tracim_frontend_lib
  61. )
  62. # install Tracim Frontend
  63. (
  64. log "cd frontend"
  65. cd frontend
  66. log "npm i"
  67. npm i
  68. log "npm link tracim_frontend_lib"
  69. npm link tracim_frontend_lib
  70. )