install_macos.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. BLUE="\e[34m"
  3. RED="\e[31m"
  4. ENDCOLOR="\e[0m"
  5. # Install rust on Linux
  6. echo -e "${BLUE}AppFlowy : The Rust programming language is required to compile AppFlowy.${ENDCOLOR}"
  7. echo -e "${BLUE}AppFlowy : We can install it now if you don't already have it on your system.${ENDCOLOR}"
  8. read -p "${BLUE}AppFlowy : Do you want to install Rust? [y/N]${ENDCOLOR} " installrust
  9. if [ ${installrust^^} == "Y" ]; then
  10. echo -e "${BLUE}AppFlowy : Installing Rust.${ENDCOLOR}"
  11. brew 'rustup-init'
  12. rustup-init -y --default-toolchain=stable
  13. else
  14. echo -e "${BLUE}AppFlowy : Skipping Rust installation.${ENDCOLOR}"
  15. fi
  16. # Install sqllite
  17. echo -e "${BLUE}AppFlowy : Installing SqlLite3.${ENDCOLOR}"
  18. brew 'sqlite3'
  19. # Enable the flutter stable channel
  20. echo -e "${BLUE}AppFlowy : Checking Flutter installation.${ENDCOLOR}"
  21. flutter channel stable
  22. # Enable linux desktop
  23. flutter config --enable-linux-desktop
  24. # Fix any problems reported by flutter doctor
  25. flutter doctor
  26. # Add the githooks directory to your git configuration
  27. echo -e "${BLUE}AppFlowy : Setting up githooks.${ENDCOLOR}"
  28. git config core.hooksPath .githooks
  29. # Change to the frontend directory
  30. cd frontend
  31. # Install cargo make
  32. echo -e "${BLUE}AppFlowy : Installing cargo-make.${ENDCOLOR}"
  33. cargo install --force cargo-make
  34. # Install duckscript
  35. echo -e "${BLUE}AppFlowy : Installing duckscript.${ENDCOLOR}"
  36. cargo install --force duckscript_cli
  37. # Install CommitLint
  38. echo -e "${BLUE}AppFlowy : Installing CommitLint.${ENDCOLOR}"
  39. npm install @commitlint/cli @commitlint/config-conventional --save-dev
  40. # Check prerequisites
  41. echo -e "${BLUE}AppFlowy : Checking prerequisites.${ENDCOLOR}"
  42. cargo make flowy_dev