diff --git a/README.md b/README.md index bd02d00..562dfc2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,11 @@ Inline `source`-ed code. ## Installation The advised installation method is using the [`bpkg` package manager][bpkg], as -this will allow versioning to be used. +this will allow versioning to be used: + +```sh +bpkg install potherca-bash/inline-source@v0.1.0 +``` Alternatively, the latest version of this project's main script can be downloaded directly: diff --git a/src/function.replace_line_with_file_content.sh b/src/function.replace_line_with_file_content.sh index 086cbcf..d78dd1a 100644 --- a/src/function.replace_line_with_file_content.sh +++ b/src/function.replace_line_with_file_content.sh @@ -16,6 +16,9 @@ replace_line_with_file_content() { if [[ ${REPLY:0:2} != '#!' ]]; then # Ignore shebang line echo "${REPLY}" + #@TODO: Add logic to allow certain lines to only be included once + # For instance to filter out `set -o errexit -o errtrace -o nounset -o pipefail` + # or recurring `source` calls #@TODO: For now we do not recurse into sourced files #elif [[ ${REPLY} =~ ^\s*source ]]; then # sLine=$(replace_line_with_file_content "${REPLY}")