diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-04-21 14:22:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-06 10:12:17 +0100 |
commit | 4446b351388825820ce2ef634383368920648bce (patch) | |
tree | f9601bc53e070c0c38b326b4b96a5a3e4d3dcec7 /bitbake/bin | |
parent | be49d0ad572ef8d05467ee2c5774774c5b7f3fe2 (diff) | |
download | poky-4446b351388825820ce2ef634383368920648bce.tar.gz |
bitbake: toaster: bin/toaster Add help text for unrecognised command
Add help text for unrecognised or missing command for toaster script
Remove assumption that no command is 'start' as the default.
(Bitbake rev: 4c0b1b9c2af70838dbcf5a676ec679f9f0c488a5)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/toaster | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 70c66d2c29..2d07255d9b 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
@@ -17,10 +17,12 @@ | |||
17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU General Public License |
18 | # along with this program. If not, see http://www.gnu.org/licenses/. | 18 | # along with this program. If not, see http://www.gnu.org/licenses/. |
19 | 19 | ||
20 | # Usage: source toaster [start|stop] | 20 | HELP=" |
21 | # [webport=<port>] [noui] [noweb] | 21 | Usage: source toaster start|stop [webport=<address:port>] [noweb] |
22 | 22 | Optional arguments: | |
23 | # Helper function to kill a background toaster development server | 23 | [noweb] Setup the environment for building with toaster but don't start the development server |
24 | [webport] Set the development server (default: localhost:8000) | ||
25 | " | ||
24 | 26 | ||
25 | webserverKillAll() | 27 | webserverKillAll() |
26 | { | 28 | { |
@@ -193,6 +195,12 @@ for param in $*; do | |||
193 | ;; | 195 | ;; |
194 | webport=*) | 196 | webport=*) |
195 | WEB_PORT="${param#*=}" | 197 | WEB_PORT="${param#*=}" |
198 | ;; | ||
199 | *) | ||
200 | echo "$HELP" | ||
201 | return 1 | ||
202 | ;; | ||
203 | |||
196 | esac | 204 | esac |
197 | done | 205 | done |
198 | 206 | ||
@@ -226,11 +234,9 @@ if [ "$CMD" = "start" ] ; then | |||
226 | return 1 | 234 | return 1 |
227 | fi | 235 | fi |
228 | elif [ "$CMD" = "" ]; then | 236 | elif [ "$CMD" = "" ]; then |
229 | if [ -z "$BBSERVER" ]; then | 237 | echo "No command specified" |
230 | CMD="start" | 238 | echo "$HELP" |
231 | else | 239 | return 1 |
232 | CMD="stop" | ||
233 | fi | ||
234 | fi | 240 | fi |
235 | 241 | ||
236 | echo "The system will $CMD." | 242 | echo "The system will $CMD." |