Skip to content

Instantly share code, notes, and snippets.

@alexdesousa
Created June 1, 2021 13:00
Show Gist options
  • Save alexdesousa/13a8f9e834bd47160eeaf689f948c2e6 to your computer and use it in GitHub Desktop.
Save alexdesousa/13a8f9e834bd47160eeaf689f948c2e6 to your computer and use it in GitHub Desktop.
`curl <url> | sh` but for Elixir >= 1.12
# Step 2: Pipe the curl's output into elixir directly.
# Warning: only execute scripts you trust.
$ FILENAME="https://raw.githubusercontent.com/wojtekmach/mix_install_examples/d98fce880eedda18747e592ec6c42b6ca817136f/scenic.exs" \
curl "$FILENAME" | exsh
# Step 1: Add the following function to your .bashrc
# (or similar file):
function exsh () {
IFS= read -r -d $'\0' contents;
elixir =(echo "$contents");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment