Created
June 1, 2021 13:00
-
-
Save alexdesousa/13a8f9e834bd47160eeaf689f948c2e6 to your computer and use it in GitHub Desktop.
`curl <url> | sh` but for Elixir >= 1.12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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