mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2024-12-19 22:57:51 +00:00
Resolve symlinks to find __origin
This commit is contained in:
parent
49eed4f283
commit
a0e38e3d8e
@ -14,6 +14,7 @@ Released: TBA.
|
||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.2...master).
|
||||
|
||||
- [x] Add feature to edit/update comments in ini file (#132, @rfuehrer)
|
||||
- [x] New magic variable `__origin` when called via symlink (@efelon)
|
||||
|
||||
## v2.4.2
|
||||
|
||||
|
@ -166,6 +166,7 @@ We are looking for endorsements! Are you also using b3bp? [Let us know](https://
|
||||
- [Lukas Stockner](mailto:oss@genesiscloud.com)
|
||||
- [Gert Goet](https://github.com/eval)
|
||||
- [@rfuehrer](https://github.com/rfuehrer)
|
||||
- [@efelon](https://github.com/efelon)
|
||||
|
||||
|
||||
## License
|
||||
|
2
main.sh
2
main.sh
@ -47,6 +47,7 @@ fi
|
||||
__dir="$(cd "$(dirname "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")" && pwd)"
|
||||
__file="${__dir}/$(basename "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")"
|
||||
__base="$(basename "${__file}" .sh)"
|
||||
__origin="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")")" && pwd)"
|
||||
# shellcheck disable=SC2034,SC2015
|
||||
__invocation="$(printf %q "${__file}")$( (($#)) && printf ' %q' "$@" || true)"
|
||||
|
||||
@ -412,6 +413,7 @@ info "__i_am_main_script: ${__i_am_main_script}"
|
||||
info "__file: ${__file}"
|
||||
info "__dir: ${__dir}"
|
||||
info "__base: ${__base}"
|
||||
info "__origin: ${__origin}"
|
||||
info "OSTYPE: ${OSTYPE}"
|
||||
|
||||
info "arg_f: ${arg_f}"
|
||||
|
Loading…
Reference in New Issue
Block a user