move around files
This commit is contained in:
parent
11ccbd9e15
commit
5cf2d5853d
|
@ -1,5 +1,5 @@
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const { execute } = require('../../shared/execute');
|
const { execute } = require('../../lxc/execute.js');
|
||||||
const { languages } = require('./languages');
|
const { languages } = require('./languages');
|
||||||
const { checkSchema, validationResult } = require('express-validator');
|
const { checkSchema, validationResult } = require('express-validator');
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const { spawn } = require('child_process');
|
const { spawn } = require('child_process');
|
||||||
const languages = require('../../shared/languages.json');
|
const languages = require('../../config/languages.json');
|
||||||
|
|
||||||
{
|
{
|
||||||
const process = spawn(__dirname + '/../../lxc/versions');
|
const process = spawn(__dirname + '/../../lxc/util/versions');
|
||||||
|
|
||||||
let output = '';
|
let output = '';
|
||||||
process.stderr.on('data', chunk => output += chunk);
|
process.stderr.on('data', chunk => output += chunk);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const { execute } = require('../shared/execute');
|
const { execute } = require('../lxc/execute.js');
|
||||||
const { readFileSync } = require('fs');
|
const { readFileSync } = require('fs');
|
||||||
const languages = require('../shared/languages.json');
|
const languages = require('../config/languages.json');
|
||||||
|
|
||||||
const [languageName, sourceFile, ...args] = process.argv.slice(2);
|
const [languageName, sourceFile, ...args] = process.argv.slice(2);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ const [languageName, sourceFile, ...args] = process.argv.slice(2);
|
||||||
console.error('Provide a language name');
|
console.error('Provide a language name');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sourceFile) {
|
if (!sourceFile) {
|
||||||
console.error('Provide a source file');
|
console.error('Provide a source file');
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -13,7 +13,7 @@ function execute(language, source, stdin = '', args = []) {
|
||||||
writeFileSync(`${LXC_ROOT}/tmp/${id}/stdin.stdin`, stdin);
|
writeFileSync(`${LXC_ROOT}/tmp/${id}/stdin.stdin`, stdin);
|
||||||
writeFileSync(`${LXC_ROOT}/tmp/${id}/args.args`, args.join('\n'));
|
writeFileSync(`${LXC_ROOT}/tmp/${id}/args.args`, args.join('\n'));
|
||||||
|
|
||||||
const process = spawn(__dirname + '/../lxc/execute', [
|
const process = spawn(__dirname + '/execute', [
|
||||||
language.name,
|
language.name,
|
||||||
id,
|
id,
|
||||||
]);
|
]);
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
cd tests
|
|
||||||
|
|
||||||
echo -n 'testing awk = '
|
echo -n 'testing awk = '
|
||||||
../../cli/execute awk awk.awk
|
../../cli/execute awk awk.awk
|
Loading…
Reference in New Issue