commit d5faed5e55493014f7986d06fcdab4165649c9f9 parent 44654e6b07045e38769d35154752ab3ad2b65907 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Sat, 20 Oct 2018 12:33:50 +0200 Modified install script Diffstat:
M | install.sh | | | 32 | ++++++++++++++++---------------- |
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/install.sh b/install.sh @@ -2,7 +2,10 @@ if [[ $(uname -s) == "Darwin" ]]; then echo "Setting up your Mac..." if ! command -v brew &> /dev/null; then - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + fi + if [ -f "Brewfile" ]; then + brew bundle fi elif [[ $(uname -s) == "Linux" ]]; then echo "Setting up your Linux environment..." @@ -11,43 +14,40 @@ else exit 1 fi -if [ -f "Brewfile" ]; then - brew bundle -fi lncommand() { ln -snfv $(pwd)/"$1" "$2"; } if [ -d ".bin" ]; then - lncommand "bin" "$HOME/.bin" + lncommand "bin" "$HOME/.bin" fi if [ -d "oh-my-zsh" ]; then - lncommand "oh-my-zsh" "$HOME/.oh-my-zsh" + lncommand "oh-my-zsh" "$HOME/.oh-my-zsh" fi if [ -f "other-scripts/gdbinit" ]; then - lncommand "other-scripts/gdbinit" "$HOME/.gdbinit" + lncommand "other-scripts/gdbinit" "$HOME/.gdbinit" fi if [ -d "shell" ]; then - for i in $(ls shell); do - lncommand shell/"$i" $HOME/."$i" - done + for i in $(ls shell); do + lncommand shell/"$i" $HOME/."$i" + done fi if [ -d "git" ]; then - for i in $(ls git); do - lncommand git/"$i" $HOME/."$i" - done + for i in $(ls git); do + lncommand git/"$i" $HOME/."$i" + done fi if [ -f "other-scripts/radio-config" ]; then - lncommand "other-scripts/radio-config" "$HOME/.radio-config" + lncommand "other-scripts/radio-config" "$HOME/.radio-config" fi if [ -d "vim" ]; then - lncommand vim/init.vimrc $HOME/.vimrc - lncommand vim/idea.vimrc $HOME/.ideavimrc + lncommand vim/init.vimrc $HOME/.vimrc + lncommand vim/idea.vimrc $HOME/.ideavimrc fi unset -f lncommand