From 0c04235d320c1ebe5e29867dfbcf48109e61d544 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Feb 2009 22:44:05 -0500 Subject: uninit and auto-init * Add uninit subcommand, which cleans up all etckeeper and VCS droppings in /etc. This is useful if you want to switch to a different VCS and don't have any history to preserve. (Preserving history and converting is of course possible, but significantly harder.) * Run etckeeper init on initial install. Closes: #505772 (The idea being that if someone doesn't want to use git, they can immediatly uninit to easily reverse this.) * Document how to change the VCS used by etckeeper, without preserving any history. Preserving history left as an exersise for the reader. Closes: #515237 --- uninit.d/50vcs-uninit | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 uninit.d/50vcs-uninit (limited to 'uninit.d/50vcs-uninit') diff --git a/uninit.d/50vcs-uninit b/uninit.d/50vcs-uninit new file mode 100755 index 0000000..c9896ed --- /dev/null +++ b/uninit.d/50vcs-uninit @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$VCS" = git ]; then + rm -rf .git .gitignore +elif [ "$VCS" = hg ]; then + rm -rf .hg .hgignore +elif [ "$VCS" = bzr ]; then + rm -rf .bzr .bzrignore +elif [ "$VCS" = darcs ]; then + rm -rf _darcs .darcsignore +fi -- cgit v1.2.3