summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctm/ctm_rmail/ctm_rmail.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-04-29 21:02:42 +0000
committerphk <phk@FreeBSD.org>1996-04-29 21:02:42 +0000
commit4c9fab8cf79cd02d9f736ca6420d778c2f7de75a (patch)
treed469de1e9a5ad8ce95cdfbbbb3bb6170a71dbd7f /usr.sbin/ctm/ctm_rmail/ctm_rmail.c
parent5c83d66490e402205b37a5615569e025c3be1d6d (diff)
downloadFreeBSD-src-4c9fab8cf79cd02d9f736ca6420d778c2f7de75a.zip
FreeBSD-src-4c9fab8cf79cd02d9f736ca6420d778c2f7de75a.tar.gz
Support for "-u" which sets the timestamp from the delta on the file.
Intended for sup mirrors etc. Not well tested yet. Reviewed by: phk Submitted by: Giles Lean <giles@nemeton.com.au> Submitted by: John Hay <jhay@mikom.csir.co.za>
Diffstat (limited to 'usr.sbin/ctm/ctm_rmail/ctm_rmail.c')
-rw-r--r--usr.sbin/ctm/ctm_rmail/ctm_rmail.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c
index bbb1cea..6b01922 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)
{
OpenPOWER on IntegriCloud