jeremyBanks / tmpdir

A Python module and command-line tool for working with temporary directories.
1 stars 0 forks source link

More Versatile IO #3

Open jeremyBanks opened 13 years ago

jeremyBanks commented 13 years ago
tmpdir
       $ARCHIVE
       -o, --out=$OUTARCHIVE
       --command-in=-
       --command-out=-
       --command-err=-

So you could pipe in or out archives, by providing something else for input or output. Maybe use . as a shortcut for /dev/null, and use that as the default if I use - for something else, without redefining --command-in/--command-out.

Works nicely with #2 for a one-liner:

curl http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz | tmpdir - -h md5:0ddfe265f1b3d0a8c2459f5bf66894c7 -s "./configure && make && sudo make install"
jeremyBanks commented 13 years ago

Err, I guess I also have.

--main-out=-
--main-err=-

but those don't conflict with what I'm doing.