Created
June 4, 2013 23:58
-
-
Save jdevera/5710630 to your computer and use it in GitHub Desktop.
Structure for subs that output code to be eval'ed
This file contains 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
#!/usr/bin/env bash | |
set -e | |
if [[ $1 != '__testrun__' ]]; then | |
sed '1,/^#BEGINEVAL/d' "$BASH_SOURCE" | |
exit 0 | |
fi | |
#BEGINEVAL | |
echo hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment