blob: 06e5d2f87b433c41f8f0311a86e2196ac245cc32 [file] [log] [blame]
Till Westmann7ce7c4b2014-11-10 06:34:23 -08001#!/usr/bin/env bash
Ian Maxon928bbd12015-09-14 17:12:48 -07002# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
Till Westmann7ce7c4b2014-11-10 06:34:23 -08009#
Ian Maxon928bbd12015-09-14 17:12:48 -070010# http://www.apache.org/licenses/LICENSE-2.0
Till Westmann7ce7c4b2014-11-10 06:34:23 -080011#
Ian Maxon928bbd12015-09-14 17:12:48 -070012# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
Till Westmannfd733ee2014-07-10 00:57:37 -070018if [ -z $MANAGIX_HOME ]
ramangrover29116eb972013-02-20 20:47:35 +000019 then
Till Westmannfd733ee2014-07-10 00:57:37 -070020 pushd $(dirname $0) >/dev/null
21 cd ..
22 export MANAGIX_HOME=$(pwd)
23 popd >/dev/null
ramangrover29116eb972013-02-20 20:47:35 +000024fi
25
ramangrover297265aec2013-03-16 01:09:54 +000026for jar in `ls $MANAGIX_HOME/lib/*.jar`
ramangrover29116eb972013-02-20 20:47:35 +000027 do
ramangrover297265aec2013-03-16 01:09:54 +000028 if [ -z $MANAGIX_CLASSPATH ]
ramangrover29116eb972013-02-20 20:47:35 +000029 then
ramangrover297265aec2013-03-16 01:09:54 +000030 MANAGIX_CLASSPATH=$jar
ramangrover29116eb972013-02-20 20:47:35 +000031 else
ramangrover297265aec2013-03-16 01:09:54 +000032 MANAGIX_CLASSPATH=$MANAGIX_CLASSPATH:$jar
ramangrover29116eb972013-02-20 20:47:35 +000033 fi
34done
35
ramangrover297265aec2013-03-16 01:09:54 +000036MANAGIX_CLASSPATH=$MANAGIX_CLASSPATH:$MANAGIX_HOME/conf/log4j.properties
Ian Maxonf18bba22015-08-21 12:35:14 -070037java $JAVA_OPTS -Dlog4j.configuration=file:$MANAGIX_HOME/conf/log4j.properties -cp $MANAGIX_CLASSPATH org.apache.asterix.installer.driver.InstallerDriver $@