Last active
January 14, 2021 19:28
-
-
Save sitch/af729687ef94c1895a69ab54df3155ec to your computer and use it in GitHub Desktop.
Install `dotfiles-manjaro`
This file contains hidden or 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 git@github.com:sitch/dotfiles-manjaro.git $HOME/.dotfiles | |
| function dot { | |
| /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
| } | |
| mkdir -p .dotfiles-backup | |
| dot checkout | |
| if [ $? = 0 ]; then | |
| echo "Checked out dotfiles-manjaro."; | |
| else | |
| echo "Backing up pre-existing dot files."; | |
| dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfiles-backup/{} | |
| fi; | |
| dot checkout | |
| dot config status.showUntrackedFiles no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment