]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: bin/toaster Add help text for unrecognised command
authorMichael Wood <michael.g.wood@intel.com>
Thu, 21 Apr 2016 13:22:04 +0000 (14:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Apr 2016 09:30:23 +0000 (10:30 +0100)
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 <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/toaster

index 70c66d2c2983522c81e962b942ccd0b82dede162..2d07255d9b829f805756f11b8c8f776b9ee2bf57 100755 (executable)
 # 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=<port>] [noui] [noweb]
-
-# Helper function to kill a background toaster development server
+HELP="
+Usage: source toaster start|stop [webport=<address:port>] [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."