Re: Bash: How to extract an executable from within?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2009-09-14 at 17:48 -0700, Daniel B. Thurman wrote:
> outname=selfextractExe.$$
> 
> function unWrapExe() {
> cat <<'EOF'
> <executable>
> EOF
> }
> 
> # Do pre-shell stuff
> 
> unWrapExe > $outname
> ./outname

A few comments on this (I realize it's only a sketch of the code):

1) Why declare a function if it has no argument? Just put the code
inline.
2) You need to make the output file executable ("chmod ...")
3) The executable isn't ./outname, it's $outname

poc

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux