Last active
February 15, 2022 11:53
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
function dotfiles { | |
/usr/bin/git --git-dir=$HOME/.files/ --work-tree=$HOME $@ | |
} | |
git clone --bare https://github.com/blacksails/dotfiles.git $HOME/.files | |
dotfiles checkout | |
if [ $? = 0 ] | |
then | |
echo "Checked out dotfiles." | |
else | |
echo "Backing up pre-existing dotfiles."; | |
dotfiles checkout 2>&1 | egrep "^\s+" | awk {'print $1'} | xargs -I% sh -c 'mkdir -p .dotfiles-backup/`dirname %`; mv % .dotfiles-backup/%' | |
fi | |
dotfiles checkout | |
dotfiles config status.showUntrackedFiles no | |
dotfiles submodule update --init --recursive | |
export ZDOTDIR=$HOME/.config/zsh | |
source ~/.config/zsh/.zshrc | |
zplug install | |
source ~/.config/zsh/.zshrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment