Last active
February 15, 2022 11:53
-
-
Save blacksails/c339bc40b53829b1676a6992e3d30d95 to your computer and use it in GitHub Desktop.
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
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