Let potomo assume msgfmt is on the path

There's no need to second-guess install locations.
This commit is contained in:
Oliver Hamlet
2016-10-15 13:46:05 +01:00
parent 50957faeaf
commit ccfbdd7aea
2 changed files with 2 additions and 20 deletions
+1
View File
@@ -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
+1 -20
View File
@@ -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,