cmake: fix grep in setupHook

This produced a warning:

> grep: Invalid range end

In a [], - has to come last.

Reported-by: Daniël de Kok <me@danieldk.eu>
Fixes: 75fdc1ced6
This commit is contained in:
Alyssa Ross 2020-08-08 15:12:12 +00:00
parent cb634b2aa5
commit cec26d6391
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -77,7 +77,7 @@ cmakeConfigurePhase() {
fi
# The argument sometimes contains garbage or variable interpolation.
# When that is the case, lets fall back to the derivation name.
if [[ -z "$shareDocName" ]] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-+]'; then
if [[ -z "$shareDocName" ]] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_+-]'; then
if [[ -n "${pname-}" ]]; then
shareDocName="$pname"
else