Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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