Skip to content

Instantly share code, notes, and snippets.

@wmnnd
Created July 25, 2018 16:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmnnd/eb9ca11f6b2a286d87ec3e7e7eb2ccf4 to your computer and use it in GitHub Desktop.
Save wmnnd/eb9ca11f6b2a286d87ec3e7e7eb2ccf4 to your computer and use it in GitHub Desktop.
#!/bin/bash
app=clock
target=/dev/shm/elixir-bintest/$app
mkdir -p $target
match=$(grep --text --line-number '^PAYLOAD:$' $0 | cut -d ':' -f 1)
payload_start=$((match + 1))
tail -n +$payload_start $0 | tar -C $target -zxf -
cd $target/rel/$app/bin
./$app "$@"
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment