Revision 9792
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/local.sh | ||
---|---|---|
7 | 7 |
|
8 | 8 |
root_dir="$(canon_rel_path "$(dirname "${BASH_SOURCE[0]}")"/../..)" || return |
9 | 9 |
|
10 |
root_rel_path() { log++; base_dir="$root_dir" path="$1" rel_path; }
|
|
10 |
root_rel_path() { base_dir="$root_dir" canon_rel_path "$1"; }
|
|
11 | 11 |
|
12 | 12 |
bin_dir="$root_dir"/bin |
13 | 13 |
bin_dir_abs="$(realpath "$bin_dir")" || return |
Also available in: Unified diff
bugfix: lib/sh/local.sh: root_rel_path(): use canon_rel_path instead of rel_path because $1 may be absolute rather than relative to the current dir, so $root_dir needs to be absoluted (which requires $1 to be absoluted as well)