Last active
July 22, 2017 12:12
-
-
Save M8is/eda455e336971d8b68504d1f5906400d to your computer and use it in GitHub Desktop.
Installation script for the M8is/dotfiles repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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