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.
29 lines
430 B
29 lines
430 B
#!/usr/bin/env node
|
|
'use strict';
|
|
var pkg = require('./package.json');
|
|
var osName = require('./');
|
|
var argv = process.argv;
|
|
|
|
function help() {
|
|
console.log([
|
|
'',
|
|
' ' + pkg.description,
|
|
'',
|
|
' Example',
|
|
' os-name',
|
|
' OS X Mavericks'
|
|
].join('\n'));
|
|
}
|
|
|
|
if (argv.indexOf('--help') !== -1) {
|
|
help();
|
|
return;
|
|
}
|
|
|
|
if (argv.indexOf('--version') !== -1) {
|
|
console.log(pkg.version);
|
|
return;
|
|
}
|
|
|
|
console.log(osName());
|