25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

73 satır
2.0 KiB

  1. #!/bin/sh
  2. RED='\033[1;31m'
  3. YELLOW='\033[1;33m'
  4. GREEN='\033[1;32m'
  5. CYAN='\033[1;36m'
  6. NC='\033[0m'
  7. info() {
  8. echo -e "${CYAN}$1${NC}"
  9. }
  10. warn() {
  11. echo -e "${YELLOW}$1${NC}"
  12. }
  13. error() {
  14. echo -e "${RED}$1${NC}"
  15. echo "See bootstrap.log for details"
  16. exit 1
  17. }
  18. success() {
  19. echo -e "${GREEN}$1${NC}"
  20. }
  21. echo "Boostrap starting..." >> bootstrap.log
  22. # Fish configuration
  23. info "Checking for fish shell..."
  24. which fish 2> /dev/null
  25. fish_found=$?
  26. if [ $fish_found -eq 0 ];
  27. then
  28. echo -e "\nFish installation" >> bootstrap.log
  29. info " -> Installing virtualfish..."
  30. pip install --user virtualfish >> boostrap.log 2>&1 || error "!! Failed to install virtualfish"
  31. info " -> Installing oh-my-fish..."
  32. curl -L https://get.oh-my.fish > install 2>> bootstrap.log || error "!! Failed to download oh-my-fish installer"
  33. curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 > install.sha256 2>> bootstrap.log || error "!! Failed to download oh-my-fish checksum"
  34. sha256sum -c install.sha256 >> bootstrap.log 2>&1 || error "!! Checksum failed for oh-my-fish."
  35. fish install --noninteractive >> bootstrap.log 2>&1
  36. ret=$?
  37. if [ $ret -eq 2 ];
  38. then
  39. warn " -> Oh-my-fish already installed, not reinstalling."
  40. elif [ $ret -eq 0 ];
  41. then
  42. success " -> Oh-my-fish installed."
  43. else
  44. error " -> !! Install failed for oh-my-fish."
  45. fi
  46. rm install install.sha256
  47. fish -c 'omf install' >> bootstrap.log 2>&1 || error "!! Oh-my-fish failed to install some packages"
  48. success "Successfully configured fish"
  49. else
  50. warn "No fish shell available, skipping."
  51. fi
  52. # nvim config
  53. info "Checking for nvim..."
  54. which nvim 2> /dev/null
  55. nvim_found=$?
  56. if [ $nvim_found -eq 0 ];
  57. then
  58. echo -e "\nNvim installation" >> bootstrap.log
  59. info " -> Setting up plugins..."
  60. curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 2>> bootstrap.log
  61. nvim +PlugInstall +qall
  62. else
  63. warn "Nvim not available, skipping."
  64. fi