Snippets

Gonzalo Pascual Script to install freshly install Dotfilia

Created by Gonzalo Pascual last modified
#!/bin/sh

mkdir -p $HOME/.local
git clone --bare git@bitbucket.org:gpascual/dotfilia.git $HOME/.local/.dotfilia.git/
function dotfilia {
   /usr/bin/git --git-dir=$HOME/.local/.dotfilia.git/ --work-tree=$HOME $@
}
mkdir -p $HOME/.dotfilia.backup
dotfilia checkout
if [ $? = 0 ]; then
  echo "Checked out config.";
  else
    echo "Backing up pre-existing dot files.";
    dotfilia checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfilia.backup/{}
fi;
dotfilia checkout
dotfilia config status.showUntrackedFiles no

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.