blob: 78e5e6da304ca9cd4b7074fdf14c28cc540c27fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// **********************************************************************
//
// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
var fs = require('fs');
var path = require('path');
var usage = function()
{
console.log("usage:");
console.log("" + process.argv[0] + " " + path.basename(process.argv[1]) + " <files>");
};
if(process.argv.length < 3)
{
usage();
process.exit(1);
}
var files = [];
for(var i = 2; i < process.argv.length; ++i)
{
files.push(process.argv[i]);
}
process.stdout.write("\n");
process.stdout.write("/** IMPORTANT: Do not edit this file -- any edits made here will be lost! **/\n");
process.stdout.write("\n");
var data, lines, line, i, j;
for(i = 0; i < files.length; ++i)
{
data = fs.readFileSync(files[i]);
lines = data.toString().split("\n");
for(j in lines)
{
line = lines[j].trim();
process.stdout.write(lines[j] + "\n");
}
process.stdout.write("\n");
}
|