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
Merged

Conversation

@johnlinp
Copy link
Contributor

@johnlinp johnlinp commented Nov 15, 2018

Fixes #2054

Copy link
Contributor

@stweil stweil left a comment

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

Loading

@johnlinp
Copy link
Contributor Author

@johnlinp johnlinp commented Nov 15, 2018

Sure. Should I close this pull request now?

Loading

@stweil
Copy link
Contributor

@stweil stweil 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.

Loading

@johnlinp
Copy link
Contributor Author

@johnlinp johnlinp 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.

Loading

@stweil stweil merged commit bfe58aa into tesseract-ocr:master Nov 15, 2018
2 of 4 checks passed
Loading
@stweil
Copy link
Contributor

@stweil stweil 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.

Loading

@johnlinp johnlinp deleted the 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants