From cec26d63917870ced3968d8de92f42661ff0e5a3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 8 Aug 2020 15:12:12 +0000 Subject: [PATCH] cmake: fix grep in setupHook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This produced a warning: > grep: Invalid range end In a [], - has to come last. Reported-by: Daniël de Kok Fixes: 75fdc1ced6c --- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index 73f24a9a205..6ae560c5645 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -77,7 +77,7 @@ cmakeConfigurePhase() { fi # The argument sometimes contains garbage or variable interpolation. # When that is the case, let’s 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