I currently have an installation bash script (INSTALL) and a bunch of files that are the program itself. I would like to pack the files and the script in one file, maybe tar (?) and make it executable so that when it is called INSTALL will run.
Any ideas of how I can do it? What's the common method, if there is one, to do to?
Thanks
You can use a shar archive. shar archives are self-contained executable shell scripts that are self-unpacking, and you can execute whatever code you want after the script unpacks.
In the Linux world, the expectation is that programs come in the form of packages. The most common package formats are rpm (used by Red Hat, CentOS, Fedora, SuSE, …) and deb (used by Debian, Ubuntu, …). You'll often need to make separate versions of your package (linking to different libraries) for different releases of these distributions.
Compared with the Windows world (pre-Market), you have more work to do, because the programmer or distributor is expected to do the bulk of the work of tracking program dependencies. The end user experience is simpler: all package installation and subsequent maintenance (including tracking new versions, upgrading, uninstalling, etc.) is done through a single tool (APT on Debian/Ubuntu, Yum on Red Hat/Fedora, etc.). As a programmer, you can gain the benefit of standard tools to build packages, to track dependencies (no need to package libraries: the build tool will add the necessary dependencies). Many distributions provide a standard channel to install packages, such as PPAs for Ubuntu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With