From 53197856ab65768aa00db066707924e81cfbc463 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 11 Mar 2015 09:05:20 -0400 Subject: [PATCH] Extend device init help message --- build/actions/device.js | 2 +- lib/actions/device.coffee | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/actions/device.js b/build/actions/device.js index f4ef099b..49a40350 100644 --- a/build/actions/device.js +++ b/build/actions/device.js @@ -109,7 +109,7 @@ exports.init = { signature: 'device init [device]', description: 'initialise a device with resin os', - help: 'Use this command to download the OS image of a certain application and write it to an SD Card.\n\nNote that this command requires admin privileges.\n\nIf `device` is omitted, you will be prompted to select a device interactively.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nYou can quiet the progress bar by passing the `--quiet` boolean option.\n\nYou may have to unmount the device before attempting this operation.\n\nYou need to configure the network type and other settings:\n\nEthernet:\n You can setup the device OS to use ethernet by setting the `--network` option to "ethernet".\n\nWifi:\n You can setup the device OS to use wifi by setting the `--network` option to "wifi".\n If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well.\n\nExamples:\n\n $ resin device init --application 91 --network ethernet\n $ resin device init /dev/disk2 --application 91 --network wifi --ssid MyNetwork --key secret', + help: 'Use this command to download the OS image of a certain application and write it to an SD Card.\n\nNote that this command requires admin privileges.\n\nIf `device` is omitted, you will be prompted to select a device interactively.\n\nNotice this command asks for confirmation interactively.\nYou can avoid this by passing the `--yes` boolean option.\n\nYou can quiet the progress bar by passing the `--quiet` boolean option.\n\nYou may have to unmount the device before attempting this operation.\n\nYou need to configure the network type and other settings:\n\nEthernet:\n You can setup the device OS to use ethernet by setting the `--network` option to "ethernet".\n\nWifi:\n You can setup the device OS to use wifi by setting the `--network` option to "wifi".\n If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well.\n\nYou can omit network related options to be asked about them interactively.\n\nExamples:\n\n $ resin device init --application 91\n $ resin device init --application 91 --network ethernet\n $ resin device init /dev/disk2 --application 91 --network wifi --ssid MyNetwork --key secret', options: [commandOptions.application, commandOptions.network, commandOptions.wifiSsid, commandOptions.wifiKey], permission: 'user', action: function(params, options, done) { diff --git a/lib/actions/device.coffee b/lib/actions/device.coffee index dd7fbb27..c39269e6 100644 --- a/lib/actions/device.coffee +++ b/lib/actions/device.coffee @@ -172,8 +172,11 @@ exports.init = You can setup the device OS to use wifi by setting the `--network` option to "wifi". If you set "network" to "wifi", you will need to specify the `--ssid` and `--key` option as well. + You can omit network related options to be asked about them interactively. + Examples: + $ resin device init --application 91 $ resin device init --application 91 --network ethernet $ resin device init /dev/disk2 --application 91 --network wifi --ssid MyNetwork --key secret '''