A common feature that mktorrent(1) is lacking is the support for writing the resulting Bencode'd data to stdout. The issue is three-fold:
- has no special meaning for --output=, and thus using --output=- results in a file named - being created in the current working directory; (unless such file exists, that is);
alternatively, --output=/dev/stdout (or similar) fails because of the unconditional use of O_CREAT | O_EXCL (as I've noted in another report);
finally, most of the diagnostics (excluding mainly actual errors) is directed to stdout, although it (arguably) makes sense to send them to stderr instead.
PS. Also to note is that as long as the use of mktorrent(1) from Shell code is considered, writing copyright information upon every invocation doesn't seem like a particularly clever idea, either. Perhaps it should be dropped altogether. Or, there could be --version…
Forwarded from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699487 (slightly reworded).
A common feature that mktorrent(1) is lacking is the support for writing the resulting Bencode'd data to stdout. The issue is three-fold:
-
has no special meaning for--output=
, and thus using--output=-
results in a file named-
being created in the current working directory; (unless such file exists, that is);--output=/dev/stdout
(or similar) fails because of the unconditional use ofO_CREAT | O_EXCL
(as I've noted in another report);The Debian bug report contains a patch implementing this.
PS. Also to note is that as long as the use of mktorrent(1) from Shell code is considered, writing copyright information upon every invocation doesn't seem like a particularly clever idea, either. Perhaps it should be dropped altogether. Or, there could be --version…