Simple Bash Installer

Following is a simple bash script to build a installer for any *nix system.


SKIP=`awk '/^__DATA_BEGIN__/ { print NR +1; exit 0; }'  \$0`
tail -n +\$SKIP \$0 | tar x
exit 0;


Save the script as "".

Put everything you need to install in a folder and tar the folder,

tar -cvvf foo.tar foo/

Concatenate everything into a file,

cat foo.tar > setup

Make it executable,

chmod 755 setup

Now when you run setup it will extract the folder in to current directory.