fix - suggestions & spellchecks pre-commit hook

This commit is contained in:
gawa 2024-09-24 13:24:39 +07:00
parent 8849e06feb
commit 9873417a8d

View File

@ -124,6 +124,7 @@ install_languages() {
fi fi
# Build list of packages to install # Build list of packages to install
to_install=()
for lang in "${langs[@]}"; do for lang in "${langs[@]}"; do
pkg="tesseract-ocr-$lang" pkg="tesseract-ocr-$lang"
@ -131,12 +132,12 @@ install_languages() {
echo "Package $pkg already installed!" echo "Package $pkg already installed!"
continue continue
else else
to_install+=($pkg) to_install+=("$pkg")
fi fi
done done
# Use apt only when we install packages # Use apt only when we install packages
if [ ${#to_install[@]} > 0 ]; then if [ ${#to_install[@]} -gt 0 ]; then
apt-get update apt-get update
for pkg in "${to_install[@]}"; do for pkg in "${to_install[@]}"; do