[philiptellis] /bb|[^b]{2}/
Never stop Grokking


Friday, November 14, 2003

Self extracting tarball

install_tar.sh:
   #!/bin/bash

   skip=9
   # blah blah blah
   tail -n +$skip $0 | tar jxvf - | (while read a; do echo -n "."; done; echo;)

   exit
   __LINE_8_END_OF_CODE__

and then cat whatever.tar.bz2 >> install_tar.sh

voila, you have a self extracting tarball. Don't forget the exit just before the __LINE_8_END_OF_CODE__, and make sure that that *is* the last line of your shell code.

set skip to the line where your tar.bz2 data starts.

0 comments :

Post a Comment

...===...