imgtools/imaker/src/imaker
author lorewang
Wed, 24 Nov 2010 14:12:23 +0800
changeset 706 5221386d044b
parent 596 9f25be3da657
permissions -rw-r--r--
external tools cannot specify path.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
596
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     1
#!/bin/bash
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     2
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     3
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     4
# All rights reserved.
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     5
# This component and the accompanying materials are made available
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     6
# under the terms of the License "Eclipse Public License v1.0"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     7
# which accompanies this distribution, and is available
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     8
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
     9
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    10
# Initial Contributors:
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    11
# Nokia Corporation - initial contribution.
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    12
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    13
# Contributors:
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    14
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    15
# Description: iMaker wrapper for Linux (Bash)
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    16
#
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    17
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    18
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    19
export IMAKER_CMDARG=
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    20
for arg in "$@"; do
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    21
    if [ -z "$IMAKER_CMDARG" ]; then IMAKER_CMDARG="'$arg'"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    22
    else IMAKER_CMDARG="$IMAKER_CMDARG '$arg'"; fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    23
done
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    24
if [ -z "$IMAKER_DIR" ]; then
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    25
    export IMAKER_DIR="`dirname "$0"`/rom/imaker"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    26
    if [ -e "`dirname "$0"`/imaker.pl" ]; then IMAKER_DIR="`dirname "$0"`"; fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    27
fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    28
export IMAKER_TOOL="$0"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    29
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    30
if [ -z "$PERL" ]; then export PERL="perl"; fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    31
$PERL -x "$IMAKER_DIR/imaker.pl"
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    32
IMAKER_ERROR=$?
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    33
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    34
if [ $IMAKER_ERROR -ne 0 ]; then
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    35
    $PERL -v >/dev/null 2>&1
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    36
    if [ $? -ne 0 ]; then
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    37
        echo "Perl is not properly installed! Environment variable PERL can be used to set the Perl exe."
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    38
    fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    39
fi
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    40
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    41
exit $IMAKER_ERROR
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    42
9f25be3da657 Updated to iMaker version 10.24.01, 14-Jun-2010.
m2lahtel <>
parents:
diff changeset
    43
# END OF IMAKER