dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Revert strategy

Open hamiltont opened this issue 11 years ago • 6 comments

It would be nice to have a strategy to "clean up" once you're all done - to let people try this project out without risk of cluttering their system. Something like this is a simple start, but it would be vastly improved if the script detected *.backup files and restored them to their proper locations, and potentially even deleted the ~/.dotfiles directory

in script/unbootstrap:

#!/usr/bin/env bash
#
# unbootstrap uninstalls things.

cd "$(dirname "$0")/.."
DOTFILES_ROOT=$(pwd)

uninstall_dotfiles () {
  info 'uninstalling dotfiles'

  for src in $(find "$DOTFILES_ROOT" -maxdepth 2 -name '*.symlink')
  do
    dst="$HOME/.$(basename "${src%.*}")"
    echo "Removing $dst"
    rm "$dst"
  done
}

hamiltont avatar Jun 03 '14 19:06 hamiltont

:+1:

love my fork of this repo, but I like the idea of being able to start from strach myself some day, without having to unbootstrap everything manually!

tcarlsen avatar Jun 04 '14 11:06 tcarlsen

By the way, it was possible to uninstall symlinks before migration from Rakefile to sh.

kirelagin avatar Jun 05 '14 08:06 kirelagin

:+1: up!

luancm avatar Sep 24 '15 19:09 luancm

:+1:

artivilla avatar Oct 21 '15 00:10 artivilla

:+1:

JackWReid avatar Dec 04 '15 22:12 JackWReid

I wrote a wrapper to manage both installing and uninstalling modules (Holman's "topics") in CNG/dotfiles. It's diverged quite a bit from this repo, but it maintains most of the topic structure and could probably be adapted to someone using this repo.

CNG avatar Apr 02 '17 10:04 CNG