From: Joey Hess Date: Thu, 3 Nov 2011 18:39:20 +0000 (-0400) Subject: better docs X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/94c5d6ef4e7fe07d83d181c5850ef5a5b58e6112 better docs --- diff --git a/mr b/mr index d3f8efb..f1ca9f6 100755 --- a/mr +++ b/mr @@ -352,14 +352,25 @@ If the "skip" parameter is set and its command returns true, then B will skip acting on that repository. The command is passed the action name in $1. -Here are three examples. The first skips the repo unless +Here are two examples. The first skips the repo unless mr is run by joey. The second uses the hours_since function (included in mr's built-in library) to skip updating the repo unless it's -been at least 12 hours since the last update. The third skips operating -on the repo unless it already exists (use mr checkout to enable the repo). +been at least 12 hours since the last update. + [mystuff] + checkout = ... skip = test `whoami` != joey + + [linux] + checkout = ... skip = [ "$1" = update ] && ! hours_since "$1" 12 + +Another way to use skip is for a lazy checkout. This makes mr skip +operating on a repo unless it already exists. To enable the +repo, you have to explicitly check it out (using "mr -d foo checkout"). + + [foo] + checkout = ... skip = lazy =item order