From 975b347b7206a0e9caeeea8349e4765b4db654f9 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 16 Aug 2013 15:42:56 +0200 Subject: Pre-up, post-up, pre-down, and post-down hooks These are programs that, if they exist, will run before or after the syncronization/removal is run. Three use cases caused this: 1. The thoughtbot dotfiles will run a vundle installation set of commands after intitial synchronization. 2. I changed the location of `.bash_history` to `.bash/history` and wanted to move `.bash_history` to `.bash/history` after up to preserve existing history. 3. Moving from an existing old-style custom install script to `rcup` might require some cleanup; this happened in practice, and required a simple script. --- man/rcdn.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'man/rcdn.1') diff --git a/man/rcdn.1 b/man/rcdn.1 index 6c641c9..24ca1a2 100644 --- a/man/rcdn.1 +++ b/man/rcdn.1 @@ -30,6 +30,17 @@ is, that directory is removed. If a rc file is not a symlink but is listed in .Va COPY_ALWAYS the file is removed. +.Pp +The +.Nm +program will run hooks before and after removing files, if these hooks +exist. Hooks are executable programs inside the dotfiles directory, with +the following names: +.Pa hooks/pre-down and +.Pa hooks/post-down . +These hooks are run each time +.Nm +is run and therefore must be idempotent. . .Bl -tag .It Fl d Ar DIR -- cgit v1.2.3