install_linux.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. BLUE="\e[34m"
  3. GREEN="\e[32m"
  4. ENDCOLOR="\e[0m"
  5. # Install rust on Linux
  6. read -p 'Do you want to install Rust? [y/N] ' installrust
  7. if [ ${installrust^^} == "Y" ]; then
  8. echo -e "${BLUE}AppFlowy : Installing Rust.${ENDCOLOR}"
  9. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  10. source $HOME/.cargo/env
  11. rustup toolchain install stable
  12. rustup default stable
  13. else
  14. echo -e "${BLUE}AppFlowy : Skipping Rust installation.${ENDCOLOR}"
  15. fi
  16. # Enable the flutter stable channel
  17. echo -e "${BLUE}AppFlowy : Checking Flutter installation.${ENDCOLOR}"
  18. flutter channel stable
  19. # Enable linux desktop
  20. flutter config --enable-linux-desktop
  21. # Fix any problems reported by flutter doctor
  22. flutter doctor
  23. # Add the githooks directory to your git configuration
  24. echo -e "${BLUE}AppFlowy : Setting up githooks.${ENDCOLOR}"
  25. git config core.hooksPath .githooks
  26. # Change to the frontend directory
  27. cd frontend
  28. # Install cargo make
  29. echo -e "${BLUE}AppFlowy : Installing cargo-make.${ENDCOLOR}"
  30. cargo install --force cargo-make
  31. # Install duckscript
  32. echo -e "${BLUE}AppFlowy : Installing duckscript.${ENDCOLOR}"
  33. cargo install --force duckscript_cli
  34. # Install CommitLint
  35. echo -e "${BLUE}AppFlowy : Installing CommitLint.${ENDCOLOR}"
  36. npm install @commitlint/cli @commitlint/config-conventional --save-dev