Skip to content

Instantly share code, notes, and snippets.

@tomtomsen
Last active February 22, 2019 16:27
Show Gist options
  • Save tomtomsen/6287d3b38c06162ee948d0af06d83a8b to your computer and use it in GitHub Desktop.
Save tomtomsen/6287d3b38c06162ee948d0af06d83a8b to your computer and use it in GitHub Desktop.

Revisions

  1. tomtomsen revised this gist Feb 22, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion dotfiles-clone.sh
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,6 @@ else
    dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfiles-backup/{}
    fi;
    dotfiles checkout
    dotfiles config status.showUntrackedFiles no
    dotfiles config status.showUntrackedFiles no
    dotfiles config user.email "[email protected]"
    dotfiles config user.name "tom tomsen"
  2. tomtomsen revised this gist Feb 22, 2019. No changes.
  3. tomtomsen revised this gist Feb 22, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dotfiles-clone.sh
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,4 @@ else
    dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfiles-backup/{}
    fi;
    dotfiles checkout
    dotfiles status.showUntrackedFiles no
    dotfiles config status.showUntrackedFiles no
  4. tomtomsen revised this gist Feb 22, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dotfiles-clone.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    git clone --bare [email protected]:tom-tomsen/dotfilesv2.git $HOME/.cfg
    git clone --bare [email protected]:tom-tomsen/dotfilesv2.git $HOME/.dotfiles
    function dotfiles {
    /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
    }
  5. tomtomsen created this gist Feb 22, 2019.
    14 changes: 14 additions & 0 deletions dotfiles-clone.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    git clone --bare [email protected]:tom-tomsen/dotfilesv2.git $HOME/.cfg
    function dotfiles {
    /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
    }
    mkdir -p .dotfiles-backup
    dotfiles checkout
    if [ $? = 0 ]; then
    echo "Checked out dotfiles.";
    else
    echo "Backing up pre-existing dot files.";
    dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotfiles-backup/{}
    fi;
    dotfiles checkout
    dotfiles status.showUntrackedFiles no