Snippets

Gonzalo Pascual Script to install freshly install Dotfilia

You are viewing an old version of this snippet. View the current version.
Revised by Gonzalo Pascual ef83815
#!/bin/sh

mkdir -p $HOME/.local
git clone --bare git@bitbucket.org:gpascual/dotfilia.git --branch revamp-with-bare-repo $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
HTTPS SSH

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