Skip to content

Instantly share code, notes, and snippets.

@sitch
Last active January 14, 2021 19:28
Show Gist options
  • Select an option

  • Save sitch/af729687ef94c1895a69ab54df3155ec to your computer and use it in GitHub Desktop.

Select an option

Save sitch/af729687ef94c1895a69ab54df3155ec to your computer and use it in GitHub Desktop.
Install `dotfiles-manjaro`
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