Last active
January 24, 2021 21:10
-
-
Save vhenzl/d430f5e3387177fb22e9234438fc33d1 to your computer and use it in GitHub Desktop.
Installation script for https://github.com/vhenzl/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
git clone --bare [email protected]:vhenzl/dotfiles.git $HOME/.dotfiles | |
function dotfiles { | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} | |
mkdir -p .dotfiles-backup | |
dotfiles checkout | |
if [ $? = 0 ]; then | |
echo "Checked out dotfiles."; | |
else | |
echo "Backing up pre-existing dot files."; | |
dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfiles-backup/{} | |
fi; | |
dotfiles checkout | |
dotfiles config status.showUntrackedFiles no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment