Remember self-extracting archives from WinZip? Ever wonder how packages for games like Quake 3 or Return To Castle Wolfenstein, drivers from nVidia, VirtualBox etc. extract and install themselves? makeself is the utility script that powers these packages on Linux – it generates a self-extractable compressed tar archive from a directory.

Features

Run an optional script during extraction

Include checksums for integrity validation

Use several compression algorithms

Portable code without any bash-specific features

Runs on several *nixes including Cygwin on Windows

The suggested extension of the self-extractable file is .run. All you need to do is to run it.

Installation

To install makeself, run:

$ git clone https://github.com/megastep/makeself $ cd makeself $ ./makeself.sh --help

Usage

makeself has many options supporting several compression algorithms (gzip. bzip2, pbzip2, xz, lzo, lz4, compress) and encoding or encryption formats (base64, gpg, ssl). Supported checksums include md5 and crc. To see the full list of options, run:

$ ./makeself.sh --help

The syntax is:

$ ./makeself.sh [params] archive_dir file_name label startup_script [args]

For example, to compress the contents of directory data in bzip2 format as data.run which will execute the script myscript.sh during auto-extraction and also display the label “Extracting my data”, issue:

$ ./makeself.sh --bzip2 data data.run "Extracting my data" ./myscript.sh

To extract the archive, run:

$ ./data.run

On GitHub: makeself