libexec/_sub in alpha_omega-1.5.10 vs libexec/_sub in alpha_omega-1.5.12

- old
+ new

@@ -1,7 +1,8 @@ #!/bin/bash +if [[ "${BASH_SOURCE##*/}" = "_sub" ]]; then function sub { local bsource="$1"; shift local sub_base="$(basename "$bsource")" local bsource_cmd="$shome/libexec/${sub_base}" @@ -31,8 +32,13 @@ else main "$@" fi } -if [[ "$#" > 0 ]]; then - sub "$@" + if [[ "$#" > 0 ]]; then + sub "$@" + fi +else + shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)" + source "$shome/libexec/_jason" + require 'sub' "$BASH_SOURCE" "$@" fi