-
-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathcleanup.js
More file actions
31 lines (24 loc) · 817 Bytes
/
cleanup.js
File metadata and controls
31 lines (24 loc) · 817 Bytes
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
'use strict';
const fs = require('fs');
const cwd = process.cwd();
const osName = require('os').type();
let libExt;
if (osName === 'Darwin') {
libExt = 'dylib';
} else if (osName === 'Windows_NT') {
libExt = 'dll';
} else {
libExt = 'so';
}
const llnodeLib = `plugin.${libExt}`;
const destLib = `llnode.${libExt}`;
let buildPath = `${cwd}/build/Release/${llnodeLib}`;
if (!fs.existsSync(buildPath))
buildPath = `${cwd}/build/Debug/${llnodeLib}`;
const destPath = `${cwd}/${destLib}`;
console.log(`Moving ${buildPath} to ${destPath}`);
fs.renameSync(buildPath, destPath);
console.log(`\nllnode plugin installed, load in lldb with:\n`);
console.log(`(lldb) plugin load ${destPath}`);
console.log('\nor copy plugin to lldb system plugin directory');
console.log('see https://github.com/nodejs/llnode\n');