Skip to content

Instantly share code, notes, and snippets.

@cjhanks
Created May 28, 2012 21:36
Show Gist options
  • Save cjhanks/2821302 to your computer and use it in GitHub Desktop.
Save cjhanks/2821302 to your computer and use it in GitHub Desktop.
Unpacker
function unload
{
match=$(grep --text --line-number '^PAYLOAD:$' $0 | cut -d ':' -f 1)
pay_start=$((match + 1))
tail -n +$pay_start $0 | tar -xzvf -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment