Skip to content

Commit

Permalink
main: show notifications against debug versions of Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 28, 2022
1 parent 650140f commit 608ac2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ble.pp
Expand Up @@ -62,6 +62,15 @@
return 1 2>/dev/null || exit 1
fi

# DEBUG version の Bash では遅いという通知
case ${BASH_VERSINFO[4]} in
(alp*|bet*|dev*|rc*|releng*|maint*)
printf '%s\n' \
"ble.sh may become very slow because this is a debug version of Bash" \
" (version '$BASH_VERSION', release status: '${BASH_VERSINFO[4]}')." \
" We recommend using ble.sh with a release version of Bash." >&2 ;;
esac

if ((BASH_SUBSHELL)); then
builtin echo "ble.sh: ble.sh cannot be loaded into a subshell." >&2
return 1 2>/dev/null || builtin exit 1
Expand Down

0 comments on commit 608ac2a

Please sign in to comment.