/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
- #!/bin/bash
- set -eu -o pipefail
- # Set up necessary packages for me to function
- install_homebrew() {
- if ! command -v brew &>/dev/null; then
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- fi
- brew upgrade
- brew install \
- ansible \
- cmake \
- go \
- htop \
- python \
- reattach-to-user-namespace \
- shellcheck \
- tmux \
- vim \
- virtualenv \
- zsh
- }
- setup_apt() {
- sudo apt update
- sudo apt install -y \
- build-essential \
- cmake \
- ctags \
- curl \
- git \
- gnome-tweak-tool \
- kitty \
- net-tools \
- python-dev \
- python-pip \
- python-virtualenv \
- python3-dev \
- python3-pip \
- python3-venv \
- ruby-dev \
- shellcheck \
- tmux \
- vim-nox \
- xclip \
- zsh
- }
- setup_fedora() {
- sudo yum update
- sudo yum install -y \
- ShellCheck \
- ctags \
- docker \
- glide \
- kernel-devel \
- python3 \
- python3-virtualenv \
- redhat-rpm-config \
- ruby \
- ruby-devel \
- vim \
- zsh
- sudo systemctl enable docker
- sudo systemctl start docker
- }
- if [[ "$(uname -s)" =~ "Darwin" ]]; then
- install_homebrew
- elif [[ "$(lsb_release -s -i)" =~ "Ubuntu" ]]; then
- setup_apt
- elif [[ "$(lsb_release -s -i)" =~ "Fedora" ]]; then
- setup_fedora
- else
- echo "Unable to determine base OS. Not installing"
- return 1
- fi