Last active
April 3, 2016 18:35
-
-
Save lstor/1f858accec946ca097defd4307dbf0a0 to your computer and use it in GitHub Desktop.
Install dotfiles
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
echo "Installing dotfiles..." | |
# Clone repo | |
git clone --bare --separate-git-dir=$HOME/.dotfiles https://github.com/lstor/dotfiles $HOME/dotfiles-unused | |
# Move submodules, if any | |
if [ -x ~/dotfiles-tmp/.gitmodules ]; do | |
cp -v ~/dotfiles-tmp/.gitmodules ~ | |
fi | |
# Configure | |
alias cfg='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' | |
cfg config --local status.showUntrackedFiles no | |
# Remove tmp dir | |
rm -vr ~/dotfiles-tmp/ | |
# Get files from bare repo | |
cfg checkout | |
echo "Installation done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment