balena-cli/bin/resin-write

17 lines
332 B
Plaintext
Raw Normal View History

2015-01-29 16:04:48 +00:00
#!/usr/bin/env node
2015-03-03 16:38:45 +00:00
var os = require('../build/actions/os');
var errors = require('../build/errors');
2015-01-29 16:04:48 +00:00
2015-01-29 17:17:26 +00:00
// TODO: Do some error handling when image or device are incorrect
2015-02-10 17:09:05 +00:00
os.install.action({
2015-01-29 16:04:48 +00:00
image: process.argv[2],
device: process.argv[3]
}, {
2015-03-03 16:38:45 +00:00
yes: true,
fromScript: true
2015-01-29 16:04:48 +00:00
}, function(error) {
return errors.handle(error);
});