Skip to content

Instantly share code, notes, and snippets.

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