megastep / makeself

A self-extracting archiving tool for Unix systems, in 100% shell script.
https://makeself.io
GNU General Public License v2.0
2.3k stars 370 forks source link

Extract files from installer without running it? #75

Closed Higgs1 closed 8 years ago

Higgs1 commented 8 years ago

Hello! I think Makeself has been really great, but I really think there should be some way to extract the files without executing the installer.

I did some Googling and I couldn't find anything, except for this: https://github.com/megastep/makeself/issues/37 but they apparently had a different issue since —noexec helped them. I agree however that there should be something like makeself --extract installer.run

Is there some simple-ish script I can use to extract the contents of the installer without having to execute it? I'll be working on a script in the meanwhile and I'll post it here if I get there first, but help would be nice! I also think implementing a makeself --extract option would be great.

Thanks :)

megastep commented 8 years ago

Well in this case the script is the archive itself (that's pretty much the whole point). I suppose you could look at the header of the file and extract what you want from there. Mostly it counts the number of lines to skip before the start of the compressed tar file so it's easy enough to do by hand if you're so inclined.

Higgs1 commented 8 years ago

I actually just did and found out the file is in fact a MojoSetup installer... So the Makeself ends after 520 lines, followed by the payload which just contains MojoSetup. The actual payload is located somewhere after that so now I'm just trying to figure that part out.