summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-03-14 21:06:37 -0400
committerJune McEnroe <programble@gmail.com>2018-03-14 21:06:37 -0400
commit2b447edc31d0c31ec793f4dc0e757781091ff3c5 (patch)
tree175e536ad42902f38a71c4417d9541d740e9ba97
parentCombine home-related scripts (diff)
downloadsrc-2b447edc31d0c31ec793f4dc0e757781091ff3c5.tar.gz
src-2b447edc31d0c31ec793f4dc0e757781091ff3c5.zip
Clean up install.sh
Diffstat (limited to '')
-rwxr-xr-xinstall.sh35
1 files changed, 12 insertions, 23 deletions
diff --git a/install.sh b/install.sh
index 77e8b734..fb7a0d93 100755
--- a/install.sh
+++ b/install.sh
@@ -1,28 +1,17 @@
 #!/bin/sh
-set -eu
+set -e -u
 
-common='gdb gnupg htop nasm sl the_silver_searcher tree'
+any='gnupg htop nasm neovim sl the_silver_searcher tree'
+brew="$any ddate git openssh"
+pkg="$any curl ddate sudo zsh"
+pacman="$any base-devel ctags gdb openssh zsh"
 
-homebrew=https://raw.githubusercontent.com/Homebrew/install/master/install
-macos() {
+homebrew='https://raw.githubusercontent.com/Homebrew/install/master/install'
+if [ "$(uname)" = 'Darwin' ]; then
     xcode-select --install || true
-    [ ! -f /usr/local/bin/brew ] && ruby -e "`curl -fsSL $homebrew`"
-    brew install $common
-    brew install ddate git neovim/neovim/neovim openssh
-}
+    [ -f /usr/local/bin/brew ] || ruby -e "$(curl -fsSL "$homebrew")"
+    exec brew install $brew
+fi
 
-freebsd() {
-    pkg install $common
-    pkg install curl ddate neovim sudo zsh
-}
-
-arch() {
-    pacman -Sy
-    pacman -S --needed base-devel
-    pacman -S --needed $common
-    pacman -S --needed neovim openssh zsh
-}
-
-[ "$(uname)" = 'Darwin' ] && macos
-[ -f /usr/local/sbin/pkg ] && freebsd
-[ -f /usr/bin/pacman ] && arch
+[ -f /usr/local/sbin/pkg ] && exec pkg install $pkg
+[ -f /usr/bin/pacman ] && pacman -Sy && exec pacman -S --needed $pacman