/setup.d/01-packages.sh

https://github.com/theevocater/dotfiles · Shell · 77 lines · 71 code · 4 blank · 2 comment · 2 complexity · 055f769214c61cab1187c0a2ad908e6b MD5 · raw file

  1. #!/bin/bash
  2. set -eu -o pipefail
  3. # Set up necessary packages for me to function
  4. install_homebrew() {
  5. if ! command -v brew &>/dev/null; then
  6. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  7. fi
  8. brew upgrade
  9. brew install \
  10. ansible \
  11. cmake \
  12. go \
  13. htop \
  14. python \
  15. reattach-to-user-namespace \
  16. shellcheck \
  17. tmux \
  18. vim \
  19. virtualenv \
  20. zsh
  21. }
  22. setup_apt() {
  23. sudo apt update
  24. sudo apt install -y \
  25. build-essential \
  26. cmake \
  27. ctags \
  28. curl \
  29. git \
  30. gnome-tweak-tool \
  31. kitty \
  32. net-tools \
  33. python-dev \
  34. python-pip \
  35. python-virtualenv \
  36. python3-dev \
  37. python3-pip \
  38. python3-venv \
  39. ruby-dev \
  40. shellcheck \
  41. tmux \
  42. vim-nox \
  43. xclip \
  44. zsh
  45. }
  46. setup_fedora() {
  47. sudo yum update
  48. sudo yum install -y \
  49. ShellCheck \
  50. ctags \
  51. docker \
  52. glide \
  53. kernel-devel \
  54. python3 \
  55. python3-virtualenv \
  56. redhat-rpm-config \
  57. ruby \
  58. ruby-devel \
  59. vim \
  60. zsh
  61. sudo systemctl enable docker
  62. sudo systemctl start docker
  63. }
  64. if [[ "$(uname -s)" =~ "Darwin" ]]; then
  65. install_homebrew
  66. elif [[ "$(lsb_release -s -i)" =~ "Ubuntu" ]]; then
  67. setup_apt
  68. elif [[ "$(lsb_release -s -i)" =~ "Fedora" ]]; then
  69. setup_fedora
  70. else
  71. echo "Unable to determine base OS. Not installing"
  72. return 1
  73. fi