For example, if I have a program that draws text onto pictures of cats, I may
want to include `cat.jpg` and `impact.ttf`. I'd like users to be able to say
simply:
goinstall github.com/foo/catsay
and have those files installed to e.g. `/usr/local/share`. Normally I would
use some sort of makefile trickery, but goinstall ignores makefiles.
Has anyone run into this situation, where you need to distribute more than
just a binary to make a tool work? How did you solve it?
Thanks,
Aaron
I would include a shell script with the program and ask users to run
it. It's not automatic, but then I'd be a little surprised if
goinstall were to install anything but Go source and object files.
> Has anyone run into this situation, where you need to distribute more than
> just a binary to make a tool work? How did you solve it?
There was another thread about this recently:
https://groups.google.com/d/topic/golang-nuts/XksK4klJ0Dg/discussion
An approach that isn't mentioned in that thread: use the go/build
package's FindTree function to locate the source path of your package.
There's an example of this in the Go Tour source:
http://code.google.com/p/go-tour/source/browse/gotour/local.go#63
Andrew