about summary refs log tree commit diff
path: root/pkgs/applications/graphics/tesseract
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2022-05-02 12:38:48 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2022-05-02 12:39:49 +0200
commit42b719a3be121861df8497b4d3de44e631694216 (patch)
tree9d121ab859ad94c8505128b004aec47b423d42ec /pkgs/applications/graphics/tesseract
parentcef05334ef64fa0e544d3af8c645b3c8c290ee2a (diff)
tesseract: fix `fetch-language-hashes`
- Don't match spaces in language names
- Remove duplicate languages
Diffstat (limited to 'pkgs/applications/graphics/tesseract')
-rwxr-xr-xpkgs/applications/graphics/tesseract/fetch-language-hashes2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/tesseract/fetch-language-hashes b/pkgs/applications/graphics/tesseract/fetch-language-hashes
index c431f1d97c260..05d4514898e30 100755
--- a/pkgs/applications/graphics/tesseract/fetch-language-hashes
+++ b/pkgs/applications/graphics/tesseract/fetch-language-hashes
@@ -25,7 +25,7 @@ else
                    >&2 echo "Invalid tessdataRev: $tessdataRev"
                    exit 1
                })
-    langCodes=$(echo $(echo "$repoPage" | grep -ohP "(?<=/)[^/]+?(?=\.traineddata)" | sort))
+    langCodes=$(echo $(echo "$repoPage" | grep -ohP "(?<=/)[^/ ]+?(?=\.traineddata)" | sort -u))
 fi
 
 for lang in $langCodes; do