diff --git a/appveyor.yml b/appveyor.yml index 5dff3a17..2b74d36a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,6 +42,7 @@ test_script: after_test: - cd %APPVEYOR_BUILD_FOLDER% - C:\Python27\Scripts\sphinx-build -b html docs build\docs\html + - set PATH=%PATH%;C:\cygwin\bin\ - node scripts\potomo.js - node scripts\archive.js # AppVeyor checks out a specific commit, but that means the archive script diff --git a/scripts/potomo.js b/scripts/potomo.js index f76a03d0..1ad999ea 100644 --- a/scripts/potomo.js +++ b/scripts/potomo.js @@ -7,25 +7,6 @@ const fs = require('fs'); const path = require('path'); const helpers = require('./helpers'); -function getMsgfmtPath() { - const paths = [ - path.join('C:\\', 'Program Files (x86)', 'Poedit', 'GettextTools', 'bin', 'msgfmt.exe'), - path.join('C:\\', 'cygwin', 'bin', 'msgfmt.exe'), - path.join('/', 'usr', 'bin', 'msgfmt'), - ]; - - for (let i = 0; i < paths.length; i += 1) { - if (helpers.fileExists(paths[i])) { - return paths[i]; - } - } - - throw new Error('No msgfmt.exe found!'); -} - -/* This isn't portable to Linux but it doesn't (yet?) need to be. */ -const msgfmtPath = getMsgfmtPath(); - let rootPath = '.'; if (process.argv.length > 2) { rootPath = process.argv[2]; @@ -40,7 +21,7 @@ fs.readdirSync(l10nPath).forEach((file) => { fs.accessSync(poPath, fs.R_OK); - childProcess.execFileSync(msgfmtPath, [ + childProcess.execFileSync('msgfmt', [ poPath, '-o', moPath,