lucachr/nitrogen

Careful with mktemp

Closed this issue · 3 comments

bash version on OS X requires something more like this on line 49 to work on different platforms. This will work on Ubuntu and OS X nicely.

    new=$(mktemp -t /tmp/nitro.XXXXXX)

Thank you for noticing! After reading [the mktemp man page for OS X](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/mktemp.1. html), I think that mktemp /tmp/nitrogen.XXXXXXXXXX will work just as well, moreover, it doesn't relay upon the TMPDIR var and it runs smoothly on systems that don't allow path separators with the '-t' flag (e.g. my Fedora installation doesn't support them). Please, could you confirm that it works as expected on your systems too?

Confirmed. -t flag is not required. Thanks!

You're welcome! I'm going to fix this.