Skip to content

Instantly share code, notes, and snippets.

@wmnnd

wmnnd/elixir-simple-dist.sh Secret

Created Jul 25, 2018
Embed
What would you like to do?
#!/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