nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-commits] [SCM] The nmh Mail Handling System branch, master, upd


From: Ralph Corderoy
Subject: Re: [nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 1.7-branchpoint-587-g843bc85
Date: Sun, 20 Sep 2020 10:45:48 +0100

Hi Eric,

> commit 843bc850b2b7732c8969b9ad25e922fb09eaf4b3
>
>     Replace GNUism with standard touch flag in test-scan-file.

http://git.savannah.nongnu.org/cgit/nmh.git/tree/test/scan/test-scan-file?id=843bc850b2b7732c8969b9ad25e922fb09eaf4b3#n56

    for i in 1 2 3 4 5 6 7 8 9 10
        ...
        arith_eval 1567890000 + "$i"; timepart=$arith_val
        destfile=$MH_TEST_DIR/Maildir/$subdir/$timepart.P$$.testhost$info
        mv "$MH_TEST_DIR/Mail/inbox/$i" "$destfile"
        # Maildir sorts by mtime, so make sure all times are unique
        touch -c -m -d "2019-09-07T16:00:$i" "$destfile"

It's a shame to have two ‘source of truth’ for the date, 1567890000 and
2019-09-07T16:00, but I can't spot a POSIX way of, say, using just
2019-09-07T16:00, touching the file, and then getting
seconds-since-epoch from its mtime to use in the Maildir filename.

It would need a little helper C program, and it's not worth it.  :-)

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]