mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 12:24:25 +00:00
c66ae7b2e4
Launch an Xspice and run: echo -ne "\033]844;127.0.0.1;9876\007" This will launch a SPiCE client connecting to 127.0.0.1:9876. Still need to add all the security stuff and generally be more defensive in the implementation.
47 lines
1.2 KiB
JavaScript
Executable File
47 lines
1.2 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var fs = require('fs');
|
|
var path = require('path');
|
|
|
|
// change to parent directory so all paths are relative to the top dir
|
|
process.chdir(path.dirname(__dirname));
|
|
|
|
var targetFile = path.join(__dirname, 'spiceproxy.js');
|
|
|
|
var files = [
|
|
'lib/utils.js',
|
|
'spiceobjects/spiceobjects.js',
|
|
'spiceobjects/generated/protocol.js',
|
|
'lib/GlobalPool.js',
|
|
'lib/GenericObjectPool.js',
|
|
'spiceproxy/socket.js',
|
|
'spiceproxy/globalpool.js',
|
|
'lib/queue.js',
|
|
'network/socketqueue.js',
|
|
'network/packetextractor.js',
|
|
'network/packetcontroller.js',
|
|
'network/sizedefiner.js',
|
|
'network/packetreassembler.js',
|
|
'network/reassemblerfactory.js',
|
|
'lib/biginteger.js',
|
|
'spiceproxy/spicechannel.js'
|
|
];
|
|
|
|
var exportString = "\nmodule.exports = wdi; \n";
|
|
|
|
console.log("Will generate %s", targetFile);
|
|
if (fs.existsSync(targetFile)) {
|
|
fs.unlinkSync(targetFile);
|
|
}
|
|
|
|
files.forEach(function (file) {
|
|
var data = fs.readFileSync(file);
|
|
console.log('... appending %s', file);
|
|
fs.appendFileSync(targetFile, data);
|
|
});
|
|
|
|
console.log("Done! Appending module.exports line...");
|
|
fs.appendFileSync(targetFile, exportString);
|
|
|
|
console.log("Finish... Everything is stored in %s", targetFile);
|