Created
September 24, 2015 15:53
-
-
Save kevsmith/5006b1545b8a01d216d8 to your computer and use it in GitHub Desktop.
Open a Elxir shell w/project code on the code path (handy when you're dealing w/compile problems)
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
#!/bin/sh | |
ebin_glob="" | |
if [ $# -eq 0 ]; then | |
printf "Detecting build path..." | |
if [ -d ./_build/dev/lib ]; then | |
ebin_glob="./_build/dev/lib/*/ebin" | |
printf "found (${ebin_glob})\n" | |
else | |
printf "skipped\n" | |
fi | |
else | |
ebin_glob="$1" | |
shift | |
fi | |
custom_path="" | |
for d in `ls -d ${ebin_glob}` | |
do | |
custom_path="${custom_path} -pa ${d}" | |
done | |
iex ${custom_path} $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment