Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Embedded archive in shell script.
- # To create script:
- # cat <this script>.sh <archive file> > <script>.run
- # chmod +x <script>.run
- archive () {
- # lines of script to skip (computed automatically)
- skip=$(awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0)
- tail -n +${skip} $0
- }
- ##############################################################################
- # Insert your script here. 'archive' will produce the archive on stdout
- archive | tar ztf -
- ##############################################################################
- # Don't modify anything below this line.
- ##############################################################################
- exit 0
- __ARCHIVE_FOLLOWS__
Add Comment
Please, Sign In to add comment