Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id BF19EE00F0B; Wed, 20 Apr 2016 10:46:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.47 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 78B2DE006D3 for ; Wed, 20 Apr 2016 10:46:21 -0700 (PDT) Received: by mail-wm0-f47.google.com with SMTP id n3so94245665wmn.0 for ; Wed, 20 Apr 2016 10:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=x+WXISSLPfbj4uK7Mimtd9tB8K4toy1FYrFru0Rokj4=; b=iBe75BLHM4dE6xIagLa+gvzF4u56AhJdl3+wxs68YhIYT/q0r+BAIVuleZ3+Z2Iw8a 0iqO2irt5g26BacA0h9LBLcvFzdMLjBppYfVwjLGNcZ9/Yms+4p6UPNt8RgnKJhreRs3 TbRg1v6w1wzi7v4491vkjzVueEzqb3jxT99FEnvRF6Gxu6AapYY8yE4ugeTKwk/tGJXk jB7u/lSZHncLBPNs21I0WiKq5ZLDq+Pf9KSZ5UeMZvs8WCvVFlWVGvPNcCQng8pdrtCu xmOrUCFJw+wMbV6VIPjKiLOzYkqz+ZHCdTjvZ9UO5w+polkWabKUvR8696NI+ArZIH4w u21A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=x+WXISSLPfbj4uK7Mimtd9tB8K4toy1FYrFru0Rokj4=; b=fvFMQYU+SapiWY/mjjDepPPGMhOoMZQ0SZphsjbHNGVHtDknBXlEu+flPN7gkQSj0K aRUUmtrI8euYuV7SvY3VHqje97DMCGYp6oW1QF5ztNSLvMC+W2K3bNrdb9UneppTZUML jrA+PuI8TWzdgcX05RSGVtYIHWlzY6P/V7VL7BB/lbug0EPNHt2tiRIkq1tl/vm7ZT3N XOnAJ27+7jFgGhTQgHDh9rdJ3jNk88X7SSxqZFFkwwvvAhSPpt4XL5Wm1gKUDzaQ/9NC xXFOx7Y+7hxCjBskPtv9aa15T8qEwpzlsuQT5s7MF/hL+h4J6jJTz6d1EfD5lNeAcjMA q6GQ== X-Gm-Message-State: AOPr4FWV2X/QvtlxVv2nF0qJOMIXYBJw7jbsJOMRkwW+lpHN0G7xd0JSByxk/pwaea6Xn+k9 X-Received: by 10.28.11.143 with SMTP id 137mr2605231wml.92.1461174381078; Wed, 20 Apr 2016 10:46:21 -0700 (PDT) Received: from draco.icx.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id xt9sm1794516wjb.17.2016.04.20.10.46.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 10:46:20 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Wed, 20 Apr 2016 18:46:09 +0100 Message-Id: <1461174371-24256-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [PATCH 1/3] toaster: bin/toaster Add help text for unrecognised command X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2016 17:46:25 -0000 Add help text for unrecognised or missing command for toaster script Remove assumption that no command is 'start' as the default. Signed-off-by: Michael Wood --- bitbake/bin/toaster | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 70c66d2..2d07255 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -17,10 +17,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/. -# Usage: source toaster [start|stop] -# [webport=] [noui] [noweb] - -# Helper function to kill a background toaster development server +HELP=" +Usage: source toaster start|stop [webport=] [noweb] + Optional arguments: + [noweb] Setup the environment for building with toaster but don't start the development server + [webport] Set the development server (default: localhost:8000) +" webserverKillAll() { @@ -193,6 +195,12 @@ for param in $*; do ;; webport=*) WEB_PORT="${param#*=}" + ;; + *) + echo "$HELP" + return 1 + ;; + esac done @@ -226,11 +234,9 @@ if [ "$CMD" = "start" ] ; then return 1 fi elif [ "$CMD" = "" ]; then - if [ -z "$BBSERVER" ]; then - CMD="start" - else - CMD="stop" - fi + echo "No command specified" + echo "$HELP" + return 1 fi echo "The system will $CMD." -- 2.1.4