Browse Source

Add install script

coc
Marcel Schneider 8 years ago
parent
commit
a0d2b063b9
  1. 23
      install.sh
  2. 0
      tmux/tmux.conf.symlink
  3. 0
      vimrc.symlink
  4. 2
      zsh/aliases.zsh
  5. 3
      zsh/zshrc.symlink

23
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

0
tmux/tmux.conf → tmux/tmux.conf.symlink

0
vimrc → vimrc.symlink

2
zsh/aliases.zsh

@ -1,6 +1,8 @@
# in case its not already thera # in case its not already thera
alias la='ls -la' alias la='ls -la'
alias v='vim '
# GIT related # GIT related
alias gs='git status' alias gs='git status'
alias gfr='git fetch && git rebase' alias gfr='git fetch && git rebase'

3
zsh/zshrc.symlink

@ -0,0 +1,3 @@
source $HOME/.oh-my-zsh/zshrc.sh
source $HOME/.dotfiles/zsh/aliases.zsh
Loading…
Cancel
Save