From a0d2b063b9d0008396eeac876e290c7b4386c093 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Fri, 23 Dec 2016 15:35:59 +0100 Subject: [PATCH] Add install script --- install.sh | 23 +++++++++++++++++++++++ tmux/{tmux.conf => tmux.conf.symlink} | 0 vimrc => vimrc.symlink | 0 zsh/aliases.zsh | 2 ++ zsh/zshrc.symlink | 3 +++ 5 files changed, 28 insertions(+) create mode 100755 install.sh rename tmux/{tmux.conf => tmux.conf.symlink} (100%) rename vimrc => vimrc.symlink (100%) create mode 100644 zsh/zshrc.symlink diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..6087f9c --- /dev/null +++ b/install.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +if [[ ! -d ~/.oh-my-zsh ]]; then + echo -e "\nInstall oh-my-zsh" + echo "=============================" + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + mv $HOME/.zshrc $HOME/.oh-my-zsh/zshrc.sh +fi + +DOTFILES=$HOME/.dotfiles + +echo -e "\nCreating symlinks" +echo "==============================" +linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' ) +for file in $linkables ; do + target="$HOME/.$( basename $file '.symlink' )" + if [ -e $target ]; then + echo "~${target#$HOME} already exists... Skipping." + else + echo "Creating symlink for $file" + ln -s $file $target + fi +done diff --git a/tmux/tmux.conf b/tmux/tmux.conf.symlink similarity index 100% rename from tmux/tmux.conf rename to tmux/tmux.conf.symlink diff --git a/vimrc b/vimrc.symlink similarity index 100% rename from vimrc rename to vimrc.symlink diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index a6e3c42..ea8dc7b 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -1,6 +1,8 @@ # in case its not already thera alias la='ls -la' +alias v='vim ' + # GIT related alias gs='git status' alias gfr='git fetch && git rebase' diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink new file mode 100644 index 0000000..d64d389 --- /dev/null +++ b/zsh/zshrc.symlink @@ -0,0 +1,3 @@ +source $HOME/.oh-my-zsh/zshrc.sh +source $HOME/.dotfiles/zsh/aliases.zsh +