Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

40 linhas
1.1 KiB

  1. #!/bin/sh
  2. RED='\033[1;31m'
  3. GREEN='\033[1;32m'
  4. CYAN='\033[1;36m'
  5. NC='\033[0m'
  6. info() {
  7. echo -e "${CYAN}$1${NC}"
  8. }
  9. error() {
  10. echo -e "${RED}$1${NC}"
  11. exit 1
  12. }
  13. success() {
  14. echo -e "${GREEN}$1${NC}"
  15. }
  16. # Fish configuration
  17. info "Checking for fish shell..."
  18. which fish 2> /dev/null
  19. fish_found=$?
  20. if [ $fish_found -eq 0 ];
  21. then
  22. success "Fish shell found."
  23. info " -> Installing virtualfish..."
  24. pip install --user virtualfish || error "!! Failed to install virtualfish"
  25. info " -> Installing oh-my-fish..."
  26. curl -L https://get.oh-my.fish > install || error "!! Failed to download oh-my-fish installer"
  27. curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 > install.sha256 || error "!! Failed to download oh-my-fish checksum"
  28. sha256sum -c install.sha256 || error "!! Checksum failed for oh-my-fish."
  29. fish install --noninteractive || error "!! Install failed for oh-my-fish."
  30. fish -c 'omf install' || error "!! Oh-my-fish failed to install some packages"
  31. success "Successfully configured fish"
  32. else
  33. info "No fish shell available, skipping."
  34. fi