diff options
author | peter <peter@FreeBSD.org> | 1995-12-26 02:49:53 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-26 02:49:53 +0000 |
commit | db42dac3f5b466d667b6c4b4d57565819b3d2f43 (patch) | |
tree | 6999e24439d78139ed2ff6a2990a3cbca250a0b4 /usr.sbin/ctm/ctm_rmail/ctm_rmail.c | |
parent | 8dd11ac8d714e7ff5cfdbd232f4ccf0d0b87e9f5 (diff) | |
download | FreeBSD-src-db42dac3f5b466d667b6c4b4d57565819b3d2f43.zip FreeBSD-src-db42dac3f5b466d667b6c4b4d57565819b3d2f43.tar.gz |
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.. :-)
Diffstat (limited to 'usr.sbin/ctm/ctm_rmail/ctm_rmail.c')
-rw-r--r-- | usr.sbin/ctm/ctm_rmail/ctm_rmail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c index 9b732fd..34bb6aa 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); |