[oe-commits] Khem Raj : gcc-cross.inc: Fix cross testing script
git at git.openembedded.org
git at git.openembedded.org
Tue May 1 11:43:58 UTC 2012
Module: openembedded-core.git
Branch: master
Commit: 4cd306ab0c9404a31f38c7e5fb67fe32fdca3d4b
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4cd306ab0c9404a31f38c7e5fb67fe32fdca3d4b
Author: Khem Raj <raj.khem at gmail.com>
Date: Sat Apr 28 08:15:30 2012 -0700
gcc-cross.inc: Fix cross testing script
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 at gmail.com>
---
meta/recipes-devtools/gcc/gcc-cross.inc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index e7a5e41..6d160d6 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -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 at 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 at target"
+ echo "Please specify the target machine and remote user in form of user at target\n"
usage
exit 1;
fi
+shift
+
echo "\$target" | grep "@" 2>&1 > /dev/null
if [ "x\$?" = "x0" ]
then
More information about the Openembedded-commits
mailing list