OT: Executable Script with archives
Kurt Granroth
kurt+plug-discuss at granroth.com
Thu Sep 20 06:56:47 MST 2007
Nathan Aubrey wrote:
> How do you create a script that has the tar file inside of it? Similar
> to what nVidia does with the driver, and so many other companies, how do
> you create teh executable script with an archive in it? I would like to
> be able to do that with a few things...
I'm not sure why this is marked OT... this seems pretty on topic to me.
Anyway, what you generally do is encode the binary file into a text
format, include it in the shell script as a HERE document, and then have
the script decode it and execute the result afterwards.
The 'shar' utility does most of this. It takes a binary file (or files)
and uuencodes them. It then puts a shell wrapper around the uuencoded
text so that all you have to do is run the script to extract the files.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20070920/3f8013e3/attachment.pgp
More information about the PLUG-discuss
mailing list