summaryrefslogtreecommitdiff
path: root/usr.sbin/ctm/ctm_rmail
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1996-04-29 21:02:42 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1996-04-29 21:02:42 +0000
commitc936f2cb5a54a6a58614150a716f45aad2c777be (patch)
treed469de1e9a5ad8ce95cdfbbbb3bb6170a71dbd7f /usr.sbin/ctm/ctm_rmail
parent89d8a804186a1d7bf18083986a8bf3c1648ca2c7 (diff)
downloadsrc-test2-c936f2cb5a54a6a58614150a716f45aad2c777be.tar.gz
src-test2-c936f2cb5a54a6a58614150a716f45aad2c777be.zip
Notes
Diffstat (limited to 'usr.sbin/ctm/ctm_rmail')
-rw-r--r--usr.sbin/ctm/ctm_rmail/ctm_rmail.19
-rw-r--r--usr.sbin/ctm/ctm_rmail/ctm_rmail.c7
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 b/usr.sbin/ctm/ctm_rmail/ctm_rmail.1
index 735e7ddd0cc0..42a51027e427 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 Dfv
+.Op Fl Dfuv
.Op Fl l Ar log
.Op Fl p Ar piecedir
.Op Fl d Ar deltadir
@@ -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 u
+Pass the
+.Fl u
+flag to the
+.Xr ctm
+command when applying the complete deltas, causing it to set the modification
+time of created and modified files to the CTM delta creation time.
.It Fl v
Pass the
.Fl v
diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c
index bbb1ceae0fa4..6b019221bd55 100644
--- a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c
+++ b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c
@@ -30,6 +30,7 @@ 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' */
+int set_time = 0; /* Set the time of the files that is changed. */
void apply_complete(void);
int read_piece(char *input_file);
@@ -61,9 +62,10 @@ main(int argc, char **argv)
err_prog_name(argv[0]);
- OPTIONS("[-Df] [-p piecedir] [-d deltadir] [-b basedir] [-l log] [file ...]")
+ OPTIONS("[-Dfuv] [-p piecedir] [-d deltadir] [-b basedir] [-l log] [file ...]")
FLAG('D', delete_after)
FLAG('f', fork_ctm)
+ FLAG('u', set_time)
FLAG('v', apply_verbose)
STRING('p', piece_dir)
STRING('d', delta_dir)
@@ -196,7 +198,8 @@ apply_complete()
if (stat(fname, &sb) < 0)
break;
- sprintf(buf, "(cd %s && ctm %s%s%s) 2>&1", base_dir,
+ sprintf(buf, "(cd %s && ctm %s%s%s%s) 2>&1", base_dir,
+ set_time ? "-u " : "",
apply_verbose ? "-v " : "", here, fname);
if ((ctm = popen(buf, "r")) == NULL)
{