From d58ca79f24abe94bd89847c1cf9ac53a87972376 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 24 Dec 2016 15:57:44 -0500 Subject: [PATCH] Refactor editor/* install/update scripts + readme --- editor/README.md | 8 ++++---- editor/emacs/env.zsh | 2 +- editor/emacs/install | 4 ++-- editor/neovim/install | 2 +- editor/neovim/update | 5 ++--- editor/vim/install | 4 ++-- editor/vimlite/install | 4 ++-- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/editor/README.md b/editor/README.md index 242e17a5..3d77c61f 100644 --- a/editor/README.md +++ b/editor/README.md @@ -3,8 +3,8 @@ I spend a lot of time in my editors; programming, writing, brainstorming, testing -- these dotfiles set them up. -+ emacs: my full-blown (and primary) development environment, running [evil-mode]. Emacs ++ **emacs:** my full-blown (and primary) development environment, running [evil-mode]. Emacs vs Vim? The answer is both. -+ neovim: my heavier-duty vim config, for systems I have more control over. -+ vim: same as neovim, but for vanilla vim -+ vimlite: a light, plug-free config for systems I have no control over. ++ **neovim:** my heavier-duty vim config, for systems I have more control over. ++ **vim:** same as neovim, but for vanilla vim ++ **vimlite:** a light, plugin-free config for systems I have no control over. diff --git a/editor/emacs/env.zsh b/editor/emacs/env.zsh index 659d45e2..6709cb98 100644 --- a/editor/emacs/env.zsh +++ b/editor/emacs/env.zsh @@ -1 +1 @@ -path=(~/.cask/bin $path) +path=($HOME/.cask/bin $path) diff --git a/editor/emacs/install b/editor/emacs/install index 5148b23d..9db766f5 100755 --- a/editor/emacs/install +++ b/editor/emacs/install @@ -8,9 +8,9 @@ case "$OSTYPE" in ;; linux*) if [[ -f /etc/arch-release ]]; then - sudo pacman --noconfirm -S make emacs python2 + sudo pacman --needed --noconfirm -S make emacs elif [[ -f /etc/debian_version ]]; then - sudo apt-get install make emacs python + sudo apt-get install -y make emacs fi if [[ ! -d ~/.cask ]]; then diff --git a/editor/neovim/install b/editor/neovim/install index 563b91a2..8b1121fc 100755 --- a/editor/neovim/install +++ b/editor/neovim/install @@ -2,7 +2,7 @@ command -v nvim >/dev/null && exit -case "$OSTYPE" in +case $OSTYPE in darwin*) brew install make brew install --HEAD neovim/neovim/neovim diff --git a/editor/neovim/update b/editor/neovim/update index fc619a16..3066f174 100755 --- a/editor/neovim/update +++ b/editor/neovim/update @@ -1,9 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash command -v nvim >/dev/null || exit -if [ -d "$HOME/.vim" ] -then +if [[ -d "$HOME/.vim" ]]; then cd "$HOME/.vim" make update fi diff --git a/editor/vim/install b/editor/vim/install index daadb211..2f82bad9 100755 --- a/editor/vim/install +++ b/editor/vim/install @@ -1,12 +1,12 @@ #!/usr/bin/env bash -case "$OSTYPE" in +case $OSTYPE in darwin*) brew install make vim ;; linux*) if [[ -f /etc/arch-release ]]; then - sudo pacman --noconfirm -S make vim + sudo pacman --needed --noconfirm -S make vim elif [[ -f /etc/debian_version ]]; then # TODO exit 1 diff --git a/editor/vimlite/install b/editor/vimlite/install index 1898cf71..60b4bceb 100755 --- a/editor/vimlite/install +++ b/editor/vimlite/install @@ -1,12 +1,12 @@ #!/usr/bin/env bash -case "$OSTYPE" in +case $OSTYPE in darwin*) brew install vim ;; linux*) if [[ -f /etc/arch-release ]]; then - sudo pacman --noconfirm -S vim + sudo pacman --needed --noconfirm -S vim elif [[ -f /etc/debian_version ]]; then sudo apt-get install -y vim exit 1