Skip to content

Commit

Permalink
[PDI-9514] - utilizing spoon.sh to launch other main methods in a uni…
Browse files Browse the repository at this point in the history
…form manner
  • Loading branch information
Bryan Rosander committed Jun 25, 2014
1 parent 87801dc commit 9e7fe2f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 329 deletions.
60 changes: 7 additions & 53 deletions assembly/package-res/carte.sh
Original file line number Diff line number Diff line change
@@ -1,59 +1,13 @@
#!/bin/sh

# **************************************************
# ** Libraries used by Kettle: **
# **************************************************

BASEDIR=`dirname $0`
cd $BASEDIR
DIR=`pwd`
cd -

. "$DIR/set-pentaho-env.sh"

setPentahoEnv

CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core-@[email protected]
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine-@[email protected]

# **************************************************
# ** 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

# ******************************************************************
# ** Set java runtime options **
# ** Change 512m to higher values in case you run out of memory **
# ** or set the PENTAHO_DI_JAVA_OPTIONS environment variable **
# ** (JAVAMEMOPTIONS is there for compatibility reasons) **
# ******************************************************************

if [ -z "$JAVAMEMOPTIONS" ]; then
JAVAMEMOPTIONS="-Xmx512m"
fi

if [ -z "$PENTAHO_DI_JAVA_OPTIONS" ]; then
PENTAHO_DI_JAVA_OPTIONS=$JAVAMEMOPTIONS
fi

OPT="$OPT $PENTAHO_DI_JAVA_OPTIONS -cp $CLASSPATH -Dorg.mortbay.util.URI.charset=UTF-8 -Djava.library.path=$LIBPATH -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=$KETTLE_PLUGIN_PACKAGES -DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT -DKETTLE_JNDI_ROOT=$KETTLE_JNDI_ROOT"

# ******************************************************************
# ** Set up the options for JAAS **
# ******************************************************************

BASEDIR="`dirname $0`"
cd "$BASEDIR"
DIR="`pwd`"
cd - > /dev/null
OPT="$OPT -Dorg.mortbay.util.URI.charset=UTF-8"
if [ ! "x$JAAS_LOGIN_MODULE_CONFIG" = "x" -a ! "x$JAAS_LOGIN_MODULE_NAME" = "x" ]; then
OPT=$OPT" -Djava.security.auth.login.config=$JAAS_LOGIN_MODULE_CONFIG"
OPT=$OPT" -Dloginmodulename=$JAAS_LOGIN_MODULE_NAME"
fi

# ***************
# ** Run... **
# ***************

"$_PENTAHO_JAVA" $OPT org.pentaho.di.www.Carte "${1+$@}"
export OPT
"$DIR/spoon.sh" -main org.pentaho.di.www.Carte "$@"
47 changes: 5 additions & 42 deletions assembly/package-res/encr.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,7 @@
#!/bin/sh

# **************************************************
# ** Libraries used by Kettle: **
# **************************************************

BASEDIR=`dirname $0`
cd $BASEDIR
DIR=`pwd`
cd -

. "$DIR/set-pentaho-env.sh"

setPentahoEnv

CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core-@[email protected]
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine-@[email protected]

# **************************************************
# ** 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 ... **
# **************************************************

OPT="$OPT -cp $CLASSPATH"

# ***************
# ** Run... **
# ***************

"$_PENTAHO_JAVA" $OPT org.pentaho.di.core.encryption.Encr "${1+$@}"




BASEDIR="`dirname $0`"
cd "$BASEDIR"
DIR="`pwd`"
cd - > /dev/null
"$DIR/spoon.sh" -main org.pentaho.di.core.encryption.Encr "$@"
54 changes: 6 additions & 48 deletions assembly/package-res/generateClusterSchema.sh
Original file line number Diff line number Diff line change
@@ -1,57 +1,15 @@
#!/bin/sh

# **************************************************
# ** Libraries used by Kettle: **
# **************************************************

BASEDIR=`dirname $0`
cd $BASEDIR
DIR=`pwd`
cd -

. "$DIR/set-pentaho-env.sh"

setPentahoEnv

CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core.jar
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-db.jar
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine.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 ... **
# **************************************************
# ******************************************************************
# ** Set java runtime options **
# ** Change 128m to higher values in case you run out of memory. **
# ******************************************************************

if [ -z "$JAVAMAXMEM" ]; then
JAVAMAXMEM="256"
fi

OPT="$OPT -Xmx${JAVAMAXMEM}m -cp $CLASSPATH -Djava.library.path=$LIBPATH -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=$KETTLE_PLUGIN_PACKAGES -DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT"
BASEDIR="`dirname $0`"
cd "$BASEDIR"
DIR="`pwd`"
cd - > /dev/null

if [ "$1" = "-x" ]; then
set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib
export LD_LIBRARY_PATH
OPT="-Xruntracer $OPT"
export OPT="-Xruntracer $OPT"
shift
fi

# ***************
# ** Run... **
# ***************

"$_PENTAHO_JAVA" $OPT org.pentaho.di.cluster.GenerateClusterSchema "${1+$@}"

"$DIR/spoon.sh" -main org.pentaho.di.cluster.GenerateClusterSchema "$@"
68 changes: 5 additions & 63 deletions assembly/package-res/import.sh
Original file line number Diff line number Diff line change
@@ -1,71 +1,13 @@
#!/bin/sh

# **************************************************
# ** Libraries used by Kettle: **
# **************************************************


BASEDIR=`dirname $0`
cd $BASEDIR
DIR=`pwd`
BASEDIR="`dirname $0`"
cd "$BASEDIR"
DIR="`pwd`"
cd - > /dev/null

. "$DIR/set-pentaho-env.sh"

setPentahoEnv

CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core-@[email protected]
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine-@[email protected]

# **************************************************
# ** 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 ... **
# **************************************************

# circumvention for the IBM JVM behavior (seems to be a problem with the IBM JVM native compiler)
if [ `uname -s` = "OS400" ]
then
CLASSPATH=${CLASSPATH}:$BASEDIR/libswt/aix/swt.jar
fi


# ******************************************************************
# ** Set java runtime options **
# ** Change 512m to higher values in case you run out of memory **
# ** or set the PENTAHO_DI_JAVA_OPTIONS environment variable **
# ** (JAVAMAXMEM is there for compatibility reasons) **
# ******************************************************************

if [ -z "$JAVAMAXMEM" ]; then
JAVAMAXMEM="512"
fi

if [ -z "$PENTAHO_DI_JAVA_OPTIONS" ]; then
PENTAHO_DI_JAVA_OPTIONS="-Xmx${JAVAMAXMEM}m"
fi

OPT="$OPT $PENTAHO_DI_JAVA_OPTIONS -cp $CLASSPATH -DDI_HOME=$DIR -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=$KETTLE_PLUGIN_PACKAGES -DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT -DKETTLE_JNDI_ROOT=$KETTLE_JNDI_ROOT"

if [ "$1" = "-x" ]; then
set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib
export LD_LIBRARY_PATH
OPT="-Xruntracer $OPT"
export OPT="-Xruntracer $OPT"
shift
fi

# ***************
# ** Run... **
# ***************

"$_PENTAHO_JAVA" $OPT org.pentaho.di.imp.Import "${1+$@}"

"$DIR/spoon.sh" -main org.pentaho.di.imp.Import "$@"
66 changes: 5 additions & 61 deletions assembly/package-res/kitchen.sh
Original file line number Diff line number Diff line change
@@ -1,71 +1,15 @@
#!/bin/sh

# **************************************************
# ** Libraries used by Kettle: **
# **************************************************


BASEDIR=`dirname $0`
cd $BASEDIR
DIR=`pwd`
BASEDIR="`dirname $0`"
cd "$BASEDIR"
DIR="`pwd`"
cd - > /dev/null

. "$DIR/set-pentaho-env.sh"

setPentahoEnv

CLASSPATH=$BASEDIR
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-core-@[email protected]
CLASSPATH=$CLASSPATH:$BASEDIR/lib/kettle-engine-@[email protected]

# **************************************************
# ** 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 ... **
# **************************************************

# circumvention for the IBM JVM behavior (seems to be a problem with the IBM JVM native compiler)
if [ `uname -s` = "OS400" ]
then
CLASSPATH=${CLASSPATH}:$BASEDIR/libswt/aix/swt.jar
fi


# ******************************************************************
# ** Set java runtime options **
# ** Change 512m to higher values in case you run out of memory **
# ** or set the PENTAHO_DI_JAVA_OPTIONS environment variable **
# ** (JAVAMAXMEM is there for compatibility reasons) **
# ******************************************************************

if [ -z "$JAVAMAXMEM" ]; then
JAVAMAXMEM="512"
fi

if [ -z "$PENTAHO_DI_JAVA_OPTIONS" ]; then
PENTAHO_DI_JAVA_OPTIONS="-Xmx${JAVAMAXMEM}m"
fi

OPT="$OPT $PENTAHO_DI_JAVA_OPTIONS -cp $CLASSPATH -DDI_HOME=$DIR -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=$KETTLE_PLUGIN_PACKAGES -DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT -DKETTLE_JNDI_ROOT=$KETTLE_JNDI_ROOT"

if [ "$1" = "-x" ]; then
set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib
export LD_LIBRARY_PATH
OPT="-Xruntracer $OPT"
export OPT="-Xruntracer $OPT"
shift
fi

# ***************
# ** Run... **
# ***************

"$_PENTAHO_JAVA" $OPT org.pentaho.di.kitchen.Kitchen "${1+$@}"

"$DIR/spoon.sh" -main org.pentaho.di.kitchen.Kitchen "$@"
Loading

0 comments on commit 9e7fe2f

Please sign in to comment.