summary refs log tree commit diff
path: root/install.sh
blob: 497bc232caec5048f1bb0fc50908413d22e812fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
set -eu

common='gdb git gnupg htop the_silver_searcher tree'

macos() {
  homebrew=https://raw.githubusercontent.com/Homebrew/install/master/install
  xcode-select --install || true
  [ ! -f /usr/local/bin/brew ] && ruby -e "`curl -fsSL $homebrew`"
  brew install $common
  brew install neovim/neovim/neovim openssh
  brew cask install iterm2
}

freebsd() {
  pkg install $common
  pkg install curl neovim sudo zsh
}

arch() {
  pacman -Sy --needed base-devel
  pacman -Sy --needed $common
  pacman -Sy --needed neovim openssh zsh
}

[ "`uname`" = 'Darwin' ] && macos && exit
[ -f /usr/local/sbin/pkg ] && freebsd && exit
[ -f /usr/bin/pacman ] && arch && exit