You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
494 B
17 lines
494 B
var util = require('./util') |
|
|
|
function strip (file, cb) { |
|
// TODO no support on windows, noop |
|
var platform = util.platform() |
|
if (platform === 'win32') return process.nextTick(cb) |
|
util.spawn('strip', stripArgs(platform, file), cb) |
|
} |
|
|
|
function stripArgs (platform, file) { |
|
if (platform === 'darwin') return [file, '-Sx'] |
|
if (platform === 'linux') return [file, '--strip-all'] |
|
// TODO find out what args to use for other platforms, e.g. 'sunos' |
|
return [] |
|
} |
|
|
|
module.exports = strip
|
|
|