rice

personal dot files and scripts for linux and macOS
Log | Files | Refs | README | LICENSE

commit 8a9e31975025193a4dd8977cf3dc8a3e53d5041f
parent 47529f5687a150441ffdddeb9b87dd324693d441
Author: Mark Feller <mark@mfeller.io>
Date:   Wed, 30 Dec 2020 12:02:43 -0700

make install easier

Diffstat:
MREADME | 2+-
Minstall | 48+++++++++++++++++++++++++++---------------------
2 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/README b/README @@ -3,4 +3,4 @@ Installation Install dot files - $ ./install [linux|macos] + $ ./install diff --git a/install b/install @@ -9,6 +9,7 @@ copy() shared() { + # Dotfiles used on all operating systems copy dots/.config/emacs $HOME/.config copy dots/.config/git $HOME/.config copy dots/.config/lf $HOME/.config @@ -23,24 +24,29 @@ shared() copy dots/.local/share/gnupg $HOME/.local/share } -case $1 in - linux) - shared - copy dots/.config/compton $HOME/.config - copy dots/.config/dunst $HOME/.config - copy dots/.config/vis $HOME/.config - copy dots/.config/mimeapps.list $HOME/.config - copy dots/.xinitrc $HOME - copy dots/.xprofile $HOME - copy dots/.zprofile $HOME - ;; - macos) - shared - copy dots/.config/alacritty $HOME/.config - copy dots/.zshenv $HOME - ;; - *) - echo "Usage: $0 [linux|macos]" - exit 2 - ;; -esac +linux() +{ + # Linux specific dotfiles + copy dots/.config/compton $HOME/.config + copy dots/.config/dunst $HOME/.config + copy dots/.config/vis $HOME/.config + copy dots/.config/mimeapps.list $HOME/.config + copy dots/.xinitrc $HOME + copy dots/.xprofile $HOME + copy dots/.zprofile $HOME +} + +macos() +{ + # macOS specific dotfiles + copy dots/.config/alacritty $HOME/.config + copy dots/.zshenv $HOME +} + +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + shared; linux +elif [[ "$OSTYPE" == "darwin"* ]]; then + shared; macos +else + echo "Usage: $0"; exit 2 +fi