Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unbound variable $FONTS #2056

Merged
merged 1 commit into from Nov 15, 2018

Conversation

@johnlinp
Copy link
Contributor

commented Nov 15, 2018

Fixes #2054

@stweil
Copy link
Contributor

left a comment

Please wait for my fix which not only handles FONTS but also many more cases.

@johnlinp

This comment has been minimized.

Copy link
Contributor Author

commented Nov 15, 2018

Sure. Should I close this pull request now?

@stweil

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2018

@rakesh-km, @johnlinp, could you please try pull request #2057? If it works for you, we can merge it and close the pull request here.

@johnlinp

This comment has been minimized.

Copy link
Contributor Author

commented Nov 15, 2018

@stweil No, it doesn't work. The error messages are:

$ ./src/training/tesstrain.sh --fonts_dir /usr/share/fonts --lang eng --linedata_only --noextract_font_properties --langdata_dir ../langdata --tessdata_dir ./tessdata --output_dir ~/tesstutorial/engtrain
./src/training/tesstrain_utils.sh: line 196: test: -v: unary operator expected
./src/training/tesstrain_utils.sh: line 199: test: -v: unary operator expected
./src/training/tesstrain_utils.sh: line 50: test: -v: unary operator expected

=== Starting training for language 'eng'
./src/training/language-specific.sh: line 1171: test: -v: unary operator expected
./src/training/language-specific.sh: line 1175: test: -v: unary operator expected
./src/training/language-specific.sh: line 1178: test: -v: unary operator expected
./src/training/tesstrain_utils.sh: line 234: FONTS[0]: unbound variable

It seems that test on macOS does not support -v option.

@stweil stweil merged commit bfe58aa into tesseract-ocr:master Nov 15, 2018

2 of 4 checks passed

LGTM analysis: C/C++ Starting up
Details
LGTM analysis: Python Starting up
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@stweil

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2018

Thank you for testing. macOS uses an old bash without support for test -v. I now merged your pull request and will have to find a different solution for the other issues.

@johnlinp johnlinp deleted the johnlinp:fix-unbound-fonts branch Nov 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.