UNPKG

shell-mirror

Version:

Access your Mac shell from any device securely. Perfect for mobile coding with Claude Code CLI, Gemini CLI, and any shell tool.

46 lines (36 loc) 917 B
#!/usr/bin/env node /* eslint no-console:0, no-process-env:0 */ 'use strict'; const { spawnSync } = require('child_process'); const libname = process.env.LIBNAME || "wrtc"; const args = ['configure']; if (process.env.DEBUG) { args.push('--debug'); } if (process.platform === 'win32') { args.push('-g'); args.push('"Visual Studio 17 2022"'); } function main() { console.log('Running ncmake ' + args.join(' ')); let { status } = spawnSync('ncmake', args, { shell: true, stdio: 'inherit' }); if (status) { throw new Error('ncmake configure failed for ' + libname); } console.log('Running ncmake build'); status = spawnSync('ncmake', ['build'], { shell: true, stdio: 'inherit' }).status; if (status) { throw new Error('ncmake build failed for ' + libname); } console.log('Built ' + libname); } module.exports = main; if (require.main === module) { main(); }