FE 'Self-Extracting Install Files'

Code Samples
of the pairs of 'build-scripts'

(FE = Freedom Environment)

FE Home page > FE Downloads page > This FE 'Self-Extracting Install Files' 'BUILD SCRIPTS' page

! Note ! These shell-script code samples may be updated over time ---
if they are changed significantly when new FE sub-systems are released.


In the summer of 2010, when I first started releasing the FE sub-systems --- 'feNautilusScripts', 'xpg', and 'feAppMenus' first --- I released each sub-system using a pair of scripts to build a 'self-extracting install file' for each FE sub-system.

The first script in each pair of build-scripts is used to build a 'gzipped tar file' containing the sub-directories and files of the sub-system. Note that this gzipped-tar-file is a 'binary file', not a 'text file' --- due to the file compression that is performed by the 'gzip' command.

The second script in each pair of build-scripts is used to hold the shell-script code that is to be concatenated at 'the front' of the 'gzipped tar file'. The purpose of that shell-script code is to read that concatenated file (the 'self-extracting install file') and

  • extract the 'gzipped tar file' from the 'back end' of the concatenated file, by using the 'tail' command (The extracted '.tgz' file is put in the '/tmp' temporary files directory.)

  • the tar-file compression is undone with a 'gunzip' command, yielding the 'tar file' containing the sub-directories and files of the FE sub-system

  • the tar file is 'un-tarred' using a 'tar -xvf' command to place the sub-directories and files into a target directory:

    • $HOME/apps/tkGooies for the FE 'tkGooies' sub-system

    • $HOME/apps/feAppMenus for the 'feAppMenus' sub-system

    • $HOME/apps/feXpg for the FE 'xpg' sub-system

    • $HOME/.gnome2/nautilus-scripts for the 'feNautilusScripts' sub-system --- but the contents of the 'nautilus-scripts' directory can be moved or copied to the $HOME/.config/caja/scripts directory to use the 'feNautilusScripts' in a MATE-Caja environment instead of a Gnome2-Nautilus environment.

The 'pairs of build scripts' for each 'self-extracting install file':

Here are the pairs of 'build-scripts', for each of four FE sub-systems.

Copious comments in these scripts explain their inner workings.

Each pair of build-scripts is used to build a 'self-extracting install file' --- which is composed of 'self-extracting shell script code' that is concatenated 'ahead of' a gzipped-tar-file, which contains the sub-directories and files of the application sub-system.

Note that during an FE install, the 'self-extracting install file' reads itself and extracts out the gzipped-tar-file (by using a 'tail' command), and then uses that extracted file to complete the installation, by using 'gunzip' and 'tar -x' commands.

You can 'right-click' on each link below, and, in the popup menu that your web browser presents, you can use an option such as 'Save Link Target As ...' to save the script code to a file on your local machine.

Or simply click on each link to see the code for each script, in a separate window or tab.

Post-Script :   (parting comments)

I have put a date in the names of these scripts to indicate the last time they were updated.

The 'tkGooies' and 'feNautilusScripts' build-scripts were used most recently and are the most up-to-date.

The 'feAppMenus' and 'xpg' build-scripts need to be updated with the 'grep'-code that automatically detects the line number of the last line of the 'self-extracting script code' (an 'exit' statement) --- and then uses that line number in the 'tail' command that extracts the gzipped-tar-file from the concatenated file that consists of the self-extracting script code followed by the binary gzipped-tar-file.

I will update those 'feAppMenus' and 'xpg' build-scripts, the next time I do a release of the 'feAppMenus' and 'xpg' sub-systems.

You are welcome to use these pairs of build-scripts as models for building your own 'self-extracting install files' for your own releases of Linux/Unix/MacOS applications.

Bottom of the FE Self-Extracting Install Files - Code Samples of Build-Scripts page.

To return to a previously visited web page, click on the
Back button of your web browser a sufficient number of times.
OR, use the History-list option of your web browser.
OR ...

< Go to Table of Contents, above. >
< Go to Top of Page, above. >
< Go to FE Home page >

Page created 2015 May 02.