Loading bashopts.sh +4 −16 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ set -e function bashopts_exit_handle() { bashopts_exit_handle() { local err=$? set +o xtrace local code="${1:-1}" Loading @@ -46,30 +46,18 @@ set -o errtrace # display a error (fatal) bashopts_critical() { local l >&2 echo -n "[ERROR] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[ERROR] %s\n" "$@" exit 1 } # display a error (non fatal) bashopts_error() { local l >&2 echo -n "[ERROR] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[ERROR] %s\n" "$@" } # display a warning (non fatal) bashopts_warning() { local l >&2 echo -n "[WARNING] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[WARNING] %s\n" "$@" } bashopts_regex_escape () { Loading Loading
bashopts.sh +4 −16 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ set -e function bashopts_exit_handle() { bashopts_exit_handle() { local err=$? set +o xtrace local code="${1:-1}" Loading @@ -46,30 +46,18 @@ set -o errtrace # display a error (fatal) bashopts_critical() { local l >&2 echo -n "[ERROR] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[ERROR] %s\n" "$@" exit 1 } # display a error (non fatal) bashopts_error() { local l >&2 echo -n "[ERROR] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[ERROR] %s\n" "$@" } # display a warning (non fatal) bashopts_warning() { local l >&2 echo -n "[WARNING] " for l in "$@"; do >&2 echo -e "$l" done >&2 printf "[WARNING] %s\n" "$@" } bashopts_regex_escape () { Loading