4

I want to simplify installation of the app on Linux system, to make it sort of one click. To do that I hope to combine bash script with compressed tar.

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

Then I have an Ant task that does this:

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

In short, file reads itself, decompresses tarball and extracts files and changes permissions.

When I run install.sh separately it works fine, but once 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 text can be combined with binary?

fedorqui
  • 275,237
  • 103
  • 548
  • 598
Dima
  • 1,788
  • 2
  • 22
  • 30
  • Possible duplicate of [this question](http://stackoverflow.com/questions/955460/how-do-linux-binary-installers-bin-sh-work) – Rom1 Jun 03 '11 at 20:32

3 Answers3

4

Perfectly feasible.

Example: http://www.stuartwells.net/slides/selfextract.htm

erickzetta
  • 681
  • 5
  • 3
0

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

0

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

Pablo Castellazzi
  • 4,164
  • 23
  • 20