This commit is contained in:
17
scripts/ci/install-system-deps/detect-tesseract-linux.sh
Executable file
17
scripts/ci/install-system-deps/detect-tesseract-linux.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
version="$(
|
||||
apt-cache policy tesseract-ocr 2>/dev/null |
|
||||
grep 'Candidate:' |
|
||||
grep -Eo '[0-9]+\.[0-9]+' |
|
||||
head -1 ||
|
||||
true
|
||||
)"
|
||||
|
||||
if [[ -z "${version}" ]]; then
|
||||
version="unknown"
|
||||
fi
|
||||
|
||||
echo "version=${version}" >>"${GITHUB_OUTPUT}"
|
||||
echo "::notice title=Tesseract Version::Detected version: ${version}"
|
||||
Reference in New Issue
Block a user