]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-cross.inc: Fix cross testing script
authorKhem Raj <raj.khem@gmail.com>
Sat, 28 Apr 2012 15:15:30 +0000 (08:15 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 May 2012 10:55:42 +0000 (11:55 +0100)
shift the cmdline argument after determining
there is atleast 1 argument to shift otherwise
it ends up in error when no argument is specified

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-devtools/gcc/gcc-cross.inc

index e7a5e41be832f06f09778e4f1751bf8806f3cd24..6d160d659a2ad4d88a37eef569f63bedb560ad62 100644 (file)
@@ -45,7 +45,6 @@ do_compile () {
        # append execution part of the script
 cat >> ${B}/${TARGET_PREFIX}testgcc << STOP
 target="\$1"
-shift
 usage () {
        echo "Usage:"
        echo "\$0 user@target 'extra options to dejagnu'"
@@ -60,11 +59,13 @@ usage () {
     }
 if [ "x\$target" = "x" ]
 then
-       echo "Please specify the target machine and remote user in form of user@target"
+       echo "Please specify the target machine and remote user in form of user@target\n"
        usage
        exit 1;
 fi
 
+shift
+
 echo "\$target" | grep "@" 2>&1 > /dev/null
 if [ "x\$?" = "x0" ]
 then