UNPKG

@kiran.kk.phonpe/node-native-ocr

Version:

Native Node.js bindings for the Tesseract OCR project.

16 lines (12 loc) 580 B
const { join } = require('path'); const path = require('path'); const shell = require('shelljs'); const homeDir = path.resolve(__dirname,'..'); shell.cd(homeDir); shell.echo(`Working directory: ${homeDir}`); applyPatchFile('leptonica_cmakelists.patch', 'leptonica'); function applyPatchFile(filename, workingDirectory) { const fullPatchFilePath = join(homeDir, 'patches', filename); shell.echo(`Applying patch ${fullPatchFilePath}`); shell.exec(`git apply ${fullPatchFilePath} --directory=${workingDirectory} --ignore-space-change --ignore-whitespace`); }