From 3656f85bbdae8295721a9152bcdb0194f3f3c358 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 26 Dec 1995 02:49:53 +0000 Subject: A trivial enhancement to ctm_rmail to support the -v option and pass it through to cvs when unpacking the delta.. (I read the output.. :-) --- usr.sbin/ctm/ctm_rmail/ctm_rmail.1 | 13 ++++++++++--- usr.sbin/ctm/ctm_rmail/ctm_rmail.c | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'usr.sbin/ctm/ctm_rmail') diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 b/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 index 35099d20c4bb..735e7ddd0cc0 100644 --- a/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 +++ b/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 @@ -21,7 +21,7 @@ deltas via mail .Ar ctm-delta .Ar mail-alias .Nm ctm_rmail -.Op Fl Df +.Op Fl Dfv .Op Fl l Ar log .Op Fl p Ar piecedir .Op Fl d Ar deltadir @@ -47,9 +47,9 @@ optionally call .Xr ctm to apply it to the source tree. At the moment, -only two source trees are distributed, and both by the same site. These are +several source trees are distributed, and by several sites. These include the FreeBSD-current source and CVS trees, distributed by -.Li ref.tfs.com . +.Li freefall.FreeBSD.org . .Pp Command line arguments for .Nm ctm_smail : @@ -148,6 +148,13 @@ Don't worry about zillions of background processes loading your machine, since locking is used to prevent more than one .Xr ctm invocation at a time. +.It Fl v +Pass the +.Fl v +flag to the +.Xr ctm +command when applying the complete deltas, causing a more informative +output. Note that you need to make your own arrangements to capture it. .El .Pp The file arguments (or diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c index 9b732fdf939e..34bb6aa9700f 100644 --- a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c +++ b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c @@ -29,6 +29,7 @@ char *piece_dir = NULL; /* Where to store pieces of deltas. */ char *delta_dir = NULL; /* Where to store completed deltas. */ char *base_dir = NULL; /* The tree to apply deltas to. */ int delete_after = 0; /* Delete deltas after ctm applies them. */ +int apply_verbose = 0; /* Run with '-v' */ void apply_complete(void); int read_piece(char *input_file); @@ -63,6 +64,7 @@ main(int argc, char **argv) OPTIONS("[-Df] [-p piecedir] [-d deltadir] [-b basedir] [-l log] [file ...]") FLAG('D', delete_after) FLAG('f', fork_ctm) + FLAG('v', apply_verbose) STRING('p', piece_dir) STRING('d', delta_dir) STRING('b', base_dir) @@ -194,7 +196,8 @@ apply_complete() if (stat(fname, &sb) < 0) break; - sprintf(buf, "(cd %s && ctm %s%s) 2>&1", base_dir, here, fname); + sprintf(buf, "(cd %s && ctm %s%s%s) 2>&1", base_dir, + apply_verbose ? "-v " : "", here, fname); if ((ctm = popen(buf, "r")) == NULL) { err("ctm failed to apply %s", delta); -- cgit v1.2.3