binary file within a shell script

Dan Nelson dnelson at allantgroup.com
Thu May 8 16:22:53 UTC 2008


In the last episode (May 08), Mathieu Prevot said:
> Hi there,
> 
> I would like to use one exec file from a shellscript but I would like
> it to be incorporated in the same file, like Nvidia do for its FreeBSD
> drivers. How can I do this in a convenient way ?

Take a look at the file generated by /usr/bin/gzexe; that's one way to
do it (basically, determine the number of lines in your shell script,
append your binary file to the end of the script, and use tail to
extract only the binary file to a tempfile).

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list