mk-ca-bundle: add -f, support passing to stdout and more
authorDaniel Stenberg <daniel@haxx.se>
Sat, 5 Jan 2013 22:29:04 +0000 (23:29 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 5 Jan 2013 22:51:12 +0000 (23:51 +0100)
commitcc4ac82bb63261ebae6766a722f8fbd85ff08c3f
treeaf0d321fddb4d025902d05fb35743c0c7e0bbdd3
parent1795e2417644e466a22baac12fecb45141c956ba
mk-ca-bundle: add -f, support passing to stdout and more

1. When the downloaded data file from Mozilla is current, but the output
bundle does not exist: continue processing to create the bundle.  The
goal is to have the output file - not just download the latest input.

2. added -f option to force re-processing the file.  Useful for
debugging/testing the process.

3. added support for output to '-' (stdout), allowing the output to be
piped.

4. All progress and error messages go to STDERR rather than STDOUT (3)

5. The script opened and closed the output file many times
unnecessarily.  It now opens it once, does the output and closes it.

6. Backup of the input files happens after successful processing, not
before.

7. The output is written to a temporary file, and renamed to the
requested name after backup - this greatly reduces the window where the
file can be seen partially written.

8. all die calls have a \n at the end to suppress perl's traceback - the
traceback isn't useful to end users.

Patch: http://curl.haxx.se/mail/lib-2013-01/0045.html
lib/mk-ca-bundle.pl