Skip to content

Instantly share code, notes, and snippets.

@M8is
Last active July 22, 2017 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M8is/eda455e336971d8b68504d1f5906400d to your computer and use it in GitHub Desktop.
Save M8is/eda455e336971d8b68504d1f5906400d to your computer and use it in GitHub Desktop.
Installation script for the M8is/dotfiles repository
#! /bin/bash
CHECKOUT=$HOME/dotfiles
BACKUP=${CHECKOUT}_backup
git clone https://github.com/M8is/dotfiles $CHECKOUT
# setup symlinks
for i in $(pushd "$CHECKOUT" && git ls-files && popd); do
# create backup
mkdir --parents "$BACKUP/$i"; mv "$i" $_
# create symlink
ls -s "$CHECKOUT/$i" "$HOME/$i"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment