Skip to content

Instantly share code, notes, and snippets.

@epcim
Created August 9, 2017 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/57ca4e4ba98342b700d4aa4d3fadf892 to your computer and use it in GitHub Desktop.
Save epcim/57ca4e4ba98342b700d4aa4d3fadf892 to your computer and use it in GitHub Desktop.
self extracting shell bash script
## makeself (14k min size)
# See: https://github.com/megastep/makeself
## for real minimalists
cat <<-EOF > /tmp/myapp.sh
#!/bin/sh -e
sed -e '1,/^exit$/d' "$0" | tar xzf - && /tmp/myapp/run.sh
exit
EOF
tar czf /tmp/myapp >> /tmp/myapp.sh
chmod +x /tmp/myapp.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment