-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
translator.sh
165 lines (131 loc) · 3.88 KB
/
translator.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/bin/sh
# ******************************************************************************
#
# Pentaho
#
# Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com
#
# Use of this software is governed by the Business Source License included
# in the LICENSE.TXT file.
#
# Change Date: 2029-07-20
# ******************************************************************************
# **************************************************
# ** Set these to the location of your mozilla
# ** installation directory. Use a Mozilla with
# ** Gtk2 and Fte enabled.
# **************************************************
# export MOZILLA_FIVE_HOME=/usr/local/mozilla
# export LD_LIBRARY_PATH=/usr/local/mozilla
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.8.1/
export LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME}:${LD_LIBRARY_PATH}
# **************************************************
# ** Libraries used by Kettle: **
# **************************************************
BASEDIR=${KETTLE_HOME}
if [ -z "$KETTLE_HOME" ]; then
BASEDIR=$(dirname $0)/dist/
fi
CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core-TRUNK-SNAPSHOT.jar
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine-TRUNK-SNAPSHOT.jar
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-ui-swt-TRUNK-SNAPSHOT.jar
CLASSPATH=$CLASSPATH:lib/saxon-dom-9.1.0.8.jar
# echo $CLASSPATH
CLASSPATH=$CLASSPATH:$BASEDIR/libswt/jface.jar
CLASSPATH=$CLASSPATH:$BASEDIR/libswt/runtime.jar
CLASSPATH=$CLASSPATH:$BASEDIR/libswt/common.jar
CLASSPATH=$CLASSPATH:$BASEDIR/libswt/commands.jar
# **************************************************
# ** JDBC & other libraries used by Kettle: **
# **************************************************
for f in `find $BASEDIR/lib -type f -name "*.jar"` `find $BASEDIR/lib -type f -name "*.zip"`
do
CLASSPATH=$CLASSPATH:$f
done
# **************************************************
# ** Platform specific libraries ... **
# **************************************************
JAVA_BIN=java
LIBPATH="NONE"
case `uname -s` in
AIX)
LIBPATH=$BASEDIR/libswt/aix/
;;
SunOS)
LIBPATH=$BASEDIR/libswt/solaris/
;;
Darwin)
LIBPATH=$BASEDIR/libswt/osx/
JAVA_BIN=$BASEDIR/libswt/osx/java_swt
chmod +x $JAVA_BIN
;;
Linux)
ARCH=`uname -m`
case $ARCH in
x86_64)
LIBPATH=$BASEDIR/libswt/linux/x86_64/
;;
i[3-6]86)
LIBPATH=$BASEDIR/libswt/linux/x86/
;;
ppc)
LIBPATH=$BASEDIR/libswt/linux/ppc/
;;
*)
echo "I'm sorry, this Linux platform [$ARCH] is not yet supported!"
exit
;;
esac
;;
FreeBSD)
ARCH=`uname -m`
case $ARCH in
x86_64)
LIBPATH=$BASEDIR/libswt/freebsd/x86_64/
echo "I'm sorry, this Linux platform [$ARCH] is not yet supported!"
exit
;;
i[3-6]86)
LIBPATH=$BASEDIR/libswt/freebsd/x86/
;;
ppc)
LIBPATH=$BASEDIR/libswt/freebsd/ppc/
echo "I'm sorry, this Linux platform [$ARCH] is not yet supported!"
exit
;;
*)
echo "I'm sorry, this Linux platform [$ARCH] is not yet supported!"
exit
;;
esac
;;
HP-UX)
LIBPATH=$BASEDIR/libswt/hpux/
;;
CYGWIN*)
./Spoon.bat
# exit
;;
*)
echo Spoon is not supported on this hosttype : `uname -s`
exit
;;
esac
export LIBPATH
if [ "$LIBPATH" != "NONE" ]
then
for f in `find $LIBPATH -name '*.jar'`
do
CLASSPATH=$CLASSPATH:$f
done
fi
# ******************************************************************
# ** Set java runtime options **
# ** Change 256m to higher values in case you run out of memory. **
# ******************************************************************
OPT="-Xmx512m -cp $CLASSPATH -Djava.library.path=$LIBPATH -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD"
# ***************
# ** Run... **
# ***************
$JAVA_BIN $OPT org.pentaho.di.ui.i18n.editor.Translator2 "${1+$@}"