imgtools/imaker/src/imaker
author Bob Rosenberg <bob.rosenberg@nokia.com>
Fri, 27 Aug 2010 14:50:55 +0100
changeset 638 024a31e39848
parent 596 9f25be3da657
permissions -rw-r--r--
Change bld.inf install location to epoc32\tools\sysdeftools

#!/bin/bash
#
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: iMaker wrapper for Linux (Bash)
#


export IMAKER_CMDARG=
for arg in "$@"; do
    if [ -z "$IMAKER_CMDARG" ]; then IMAKER_CMDARG="'$arg'"
    else IMAKER_CMDARG="$IMAKER_CMDARG '$arg'"; fi
done
if [ -z "$IMAKER_DIR" ]; then
    export IMAKER_DIR="`dirname "$0"`/rom/imaker"
    if [ -e "`dirname "$0"`/imaker.pl" ]; then IMAKER_DIR="`dirname "$0"`"; fi
fi
export IMAKER_TOOL="$0"

if [ -z "$PERL" ]; then export PERL="perl"; fi
$PERL -x "$IMAKER_DIR/imaker.pl"
IMAKER_ERROR=$?

if [ $IMAKER_ERROR -ne 0 ]; then
    $PERL -v >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        echo "Perl is not properly installed! Environment variable PERL can be used to set the Perl exe."
    fi
fi

exit $IMAKER_ERROR

# END OF IMAKER