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