imgtools/imaker/src/imaker
author andy simpson <andrews@symbian.org>
Fri, 30 Jul 2010 15:14:33 +0100
changeset 652 311511800c67
parent 596 9f25be3da657
permissions -rw-r--r--
Add export for s60ibymacros.pm (re-applies missing part of fix for Bug 2901

#!/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