how to create a self extracting tarball?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Nov 20 18:08:29 UTC 2008


On Thu, Nov 20, 2008 at 12:58:08PM -0500, bob 295 wrote:
> I'm trying to streamline the installation of a tarball for an open source 
> project I maintain.    Currently the users manually undo the tarball and then 
> manually execute a build script from within that tarball.  eg.
> 
> tar -zxvf simpl.3.2.1.tar.gz
> simpl/scripts/buildsimpl
> 
> I'd like to simplify things to the point that the user downloads a file called 
> "simpl.3.2.1" and then installs it by typing that file name.  ie. simpl.3.2.1
> 
> Any ideas how I could go about this?
> 
> Certainly I could build in some self extraction and autolocation logic into a 
> higher level script which I bundle into my tarball and call it "installer".   
> The process simplifies a little to:
> 
> tar -zxvf simpl.3.2.1.tar.gz installer
> ./installer
> 
> but that doesn't meet my goal of a self extracting file.
> 
> Thanks in advance for any suggestions.

The traditional method involves doing a shar archive (shell archive),
which is a shell script containing a uuencoded or similar tar file,
which will then extract it's own contents and do the appropriate work
on it.

Personally, I _HATE_ when people do that.

System administrators install stuff.  They know how to do that.

Users use things, they do NOT install things, and they most certainly
never ever ever execute 3rd party code.  Well unless they are windows
users that is, and well we know how well that works security and
stability wise.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list