forked from nodejs/llnode
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcleanup.js
More file actions
23 lines (16 loc) · 704 Bytes
/
Copy pathcleanup.js
File metadata and controls
23 lines (16 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
const fs = require('fs');
const cwd = process.cwd();
const libExt = require('os').type() === 'Darwin' ? 'dylib' : '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');