Created
May 30, 2017 11:47
-
-
Save bblanchon/2b110fa39ecacc7b228168b36bf49b15 to your computer and use it in GitHub Desktop.
POSIX shell: source another script without replacing $0
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
include() { | |
eval "$(cat "$(dirname "$0")/$1")" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment