123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #!/usr/bin/env node
-
-
-
- var device = require('./device');
- var args = process.argv;
-
- if (args.length > 2) {
- var install_target;
- if (args[2].substring(0, 9) === '--target=') {
- install_target = args[2].substring(9, args[2].length);
- device.install(install_target).catch(function (err) {
- console.error('ERROR: ' + err);
- process.exit(2);
- });
- } else {
- console.error('ERROR : argument \'' + args[2] + '\' not recognized.');
- process.exit(2);
- }
- } else {
- device.install().catch(function (err) {
- console.error('ERROR: ' + err);
- process.exit(2);
- });
- }
|