It is easy to make a self extracting archive on Linux. No need for sharutils or makeself. Just add the following 39 characters onto the front of an XZ compressed tar archive, then you can make it executable and run it to extract (you need only change 'J' to 'z' or 'j' if you want to use a gzip or bzip2 compressed archive).
Code:
#!/bin/sh
tail -n+4 "$0" | tar Jx
exit
Note: Make sure there aren't more than
3 lines in sfx-stub (e.g. too many line feeds at the end), otherwise it won't work. You can double check this with "wc -l sfx-stub", before you add the file to the front of your archive.
To add this to the front of an archive, save the above in a text file called 'sfx-stub' and then use cat like so:
Code:
cat sfx-stub example.tar.xz > extract-example.sh
Of course one could argue that self extracting archives are pointless on *nix systems anyway given that tar is always present, plus the need to make the file executable first, limiting the convenience aspect.