Is it possible to mix text with binary in linux?

I want to simplify the installation of an application on a Linux system to make it one click away. For this, I hope to combine a bash script with compressed tar.

So, I have install.sh and some_app.tar.gz .

Then I have an Ant task that does this:

 cat install.sh some_app.tar.gz > some_app.exe 

In short, the file reads itself, unpacks the tarball files, extracts the files, and allows the changes.

When I run install.sh separately, it works fine, but as soon as I run some_app.exe , it fails with the following error:

 /some_app.exe: line 4: Binary file (standard input) matches + 1: arithmetic syntax error 

So, I wonder if it is possible to combine text with binary?

+4
source share
3 answers
+4
source

What you are looking for are Bash Self-Extracting Tar files .

0
source

Already done: P ... http://megastep.org/makeself/

0
source

All Articles