TAR to shell script
The tartos script is a standalone bash shell script which binds different type of TAR archives to a single shell script (bash). This kind of approach is generally adopted to make a single install scipt from an existing tar archives with executable 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.
.tar .tar.lz .tar.lzo .tar.lzma .tar.gz .tar.xz .tar.bz2
It can be installed by giving the "install" file execution permission and running it in terminal.
sudo apt-add-repository -y ppa:neurobin/ppa sudo apt-get update sudo apt-get install tartos
tartos archive scriptname
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 erntire content will be put in that directory. It can be a install directoy like
- It can take upto four arguments, the first argument is a tar archive, second one is the name of the target script file, third one is custom command and the 4th argument is
[-o outdir]can take any position as long as the sequence of the first three argument is maintained.
- output directory can be specified without
-otoo. In that case all the arguments are mandatory.
- It will ask for necessary arguments/info as it needs on the way.
- Give commands inside quotation mark: double quotation is recommended
- Best way of giving custom command is to write them in another script and put that script as a command into tartos command input. This script should reside in the tar archive itself and thus will be run after the archive is extracted (works like a post extract hook).
~$ tartos Enter the path of the tar archive:
tartos *.tar.bz2 install-me.sh
tartos *.tar.bz2 install-me.sh './internal-installer.sh'
tartos -o outputdir *.tar.bz2 install-me.sh "./internal-installer.sh"
tartos *.tar.xz install-me.sh "./internal-installer.sh" outdir