Till Westmann | 7ce7c4b | 2014-11-10 06:34:23 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame^] | 2 | # 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 Westmann | 7ce7c4b | 2014-11-10 06:34:23 -0800 | [diff] [blame] | 9 | # |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame^] | 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
Till Westmann | 7ce7c4b | 2014-11-10 06:34:23 -0800 | [diff] [blame] | 11 | # |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame^] | 12 | # 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 Westmann | fd733ee | 2014-07-10 00:57:37 -0700 | [diff] [blame] | 18 | if [ -z $MANAGIX_HOME ] |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 19 | then |
Till Westmann | fd733ee | 2014-07-10 00:57:37 -0700 | [diff] [blame] | 20 | pushd $(dirname $0) >/dev/null |
| 21 | cd .. |
| 22 | export MANAGIX_HOME=$(pwd) |
| 23 | popd >/dev/null |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 24 | fi |
| 25 | |
ramangrover29 | 7265aec | 2013-03-16 01:09:54 +0000 | [diff] [blame] | 26 | for jar in `ls $MANAGIX_HOME/lib/*.jar` |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 27 | do |
ramangrover29 | 7265aec | 2013-03-16 01:09:54 +0000 | [diff] [blame] | 28 | if [ -z $MANAGIX_CLASSPATH ] |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 29 | then |
ramangrover29 | 7265aec | 2013-03-16 01:09:54 +0000 | [diff] [blame] | 30 | MANAGIX_CLASSPATH=$jar |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 31 | else |
ramangrover29 | 7265aec | 2013-03-16 01:09:54 +0000 | [diff] [blame] | 32 | MANAGIX_CLASSPATH=$MANAGIX_CLASSPATH:$jar |
ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame] | 33 | fi |
| 34 | done |
| 35 | |
ramangrover29 | 7265aec | 2013-03-16 01:09:54 +0000 | [diff] [blame] | 36 | MANAGIX_CLASSPATH=$MANAGIX_CLASSPATH:$MANAGIX_HOME/conf/log4j.properties |
Ian Maxon | f18bba2 | 2015-08-21 12:35:14 -0700 | [diff] [blame] | 37 | java $JAVA_OPTS -Dlog4j.configuration=file:$MANAGIX_HOME/conf/log4j.properties -cp $MANAGIX_CLASSPATH org.apache.asterix.installer.driver.InstallerDriver $@ |