The license file support was not usable (missing options, and old call to ResMerger).
I added a python script to generate the resource fork starting with a txt file, and put the
script in support/.
I also added a call to readlink to resolve the support/ path as I usually symlink my binaries
into /usr/local/bin .
Hope that helps!
add support for EULA resource fork
Merge pull request #14 from wesen/master
Support for adding a license file to the DMG
Thanks for fixing it!
my readlink fix is actually broken, i switched to greadlink -f, but greadlink is not installed by default. recursive solutions for symlinks are quite ugly...
So what do we do about that? How broken is readlink? Any chance to use something like a Perl or Ruby script for that?
ruby -e 'puts File.expand_path(File.readlink(ARGV.first), File.dirname(ARGV.first))' -- /tmp
should work with relative and absolute symlinks.
...although, if you want to resolve links and keep everything else intact, try this instead:
ruby -e 'puts((File.expand_path(File.readlink(ARGV.first), File.dirname(ARGV.first)) rescue ARGV.first))' -- /tmp
the ruby sounds good! :)
Using readlink here breaks the script.
According to man, "When invoked as readlink, only the target of the symbolic link is printed. If the given argument is not a symbolic link, readlink will print nothing and exit with an error.".
Since $0 (create-dmg) is not a symlink, nothing is printed, thus line 118 of the script is interpreted as:
which results in the error output: "usage: dirname path"
yep, I switched this to greadlink, which works in a more sensible way. Andrey has a small ruby oneliner that does the same thing.