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>
This commit is contained in:
parent
be49d0ad57
commit
4446b35138
|
@ -17,10 +17,12 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
# Usage: source toaster [start|stop]
|
HELP="
|
||||||
# [webport=<port>] [noui] [noweb]
|
Usage: source toaster start|stop [webport=<address:port>] [noweb]
|
||||||
|
Optional arguments:
|
||||||
# Helper function to kill a background toaster development server
|
[noweb] Setup the environment for building with toaster but don't start the development server
|
||||||
|
[webport] Set the development server (default: localhost:8000)
|
||||||
|
"
|
||||||
|
|
||||||
webserverKillAll()
|
webserverKillAll()
|
||||||
{
|
{
|
||||||
|
@ -193,6 +195,12 @@ for param in $*; do
|
||||||
;;
|
;;
|
||||||
webport=*)
|
webport=*)
|
||||||
WEB_PORT="${param#*=}"
|
WEB_PORT="${param#*=}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$HELP"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -226,11 +234,9 @@ if [ "$CMD" = "start" ] ; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
elif [ "$CMD" = "" ]; then
|
elif [ "$CMD" = "" ]; then
|
||||||
if [ -z "$BBSERVER" ]; then
|
echo "No command specified"
|
||||||
CMD="start"
|
echo "$HELP"
|
||||||
else
|
return 1
|
||||||
CMD="stop"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The system will $CMD."
|
echo "The system will $CMD."
|
||||||
|
|
Loading…
Reference in New Issue