Tartos

TAR to self-extracting shell script (bash)

The tartos.sh script is a standalone bash shell script which binds different type of TAR archives to a single bash shell script (The tartos file is a binary of it). This kind of approach is generally adopted to make a single install scipt from an existing tar archives with executables or installable software. It can be used to make a self extracting archive/installer which does some additional jobs like installing softwares, compared to the conventional tar archive files. The tartos script itself is written in bash and thus depends on it and on the package tar.

Supported TARs:

.tar
.tar.lz
.tar.lzo
.tar.lzma
.tar.gz
.tar.xz
.tar.bz2

Install:

From Source:

Give the "install" file execution permission and run it once in terminal or drag & drop it in terminal and hit enter.

For Ubuntu:

sudo apt-add-repository -y ppa:neurobin/ppa
sudo apt-get update
sudo apt-get install tartos

Use:

tartos archive scriptname
archive is the TAR archive file/path and scriptname is the name of the script to be created

Advanced Use:

tartos archive scriptname "commands" -o outputdir

outputdir is a directory which will be bound inside the shell script so that whent the script runs, the entire output will be put in that directory.

Key Points:

  1. It can take upto four arguments, the first argument is a tar archive,

    second one is the name of the target script file

    and third one is custom command and the 4th argument is of type [-o outdir]

    [-o outdir] can take any position as long as the sequence of the first three argument is maintained.

    Ex1: tartos path_to_tar_file script_name_or_path command

    Ex2: tartos archive script command -o directory

    Ex3: tartos -O directory archive script command

    -o and -O is equivalent

  2. output directory can be specified without -o too. In that case all the arguments are mandatory

    tartos archive script "commands" outdir
  3. It will ask for necessary arguments/info as it needs on the way.
  4. Give commands inside quotation mark: double quotation is recommended
  5. Best way of giving custom command is to write them in another script and put that script as a command into tartos command input.

    Ex:
    Enter custom command or script (if any): ./mycustomscript

    if the path to the script contains space, use double quotes

Manual Page:

After installing it, you can access the man page by running:

man tartos

or can get help by running:

tartos -h

or

tartos --help

Contribute:


If you are a developer, you can consider contributing to this project by forking this repository and making changes for better and do a pull request, or sharing ideas and suggestions or finding bugs, anything at all, what you think will be beneficial for this project.

If you aren't a developer, but still want to contribute, then you can support the contributing developers spiritually, by starring the repository and sharing ideas. If you want to be notified of the continuous development, you can add this in your watch list in Github.

If you see any problems or bugs please open an issue here