xref: /Lucene/lucene/distribution/src/binary-release/bin/luke.sh (revision 81ab1e598f4e2a6f16de312614823c9eccb7abe2)
1d973e50cSUwe Schindler#!/bin/sh
2627ef4d4SDawid Weiss
3627ef4d4SDawid Weiss#  Licensed to the Apache Software Foundation (ASF) under one or more
4627ef4d4SDawid Weiss#  contributor license agreements.  See the NOTICE file distributed with
5627ef4d4SDawid Weiss#  this work for additional information regarding copyright ownership.
6627ef4d4SDawid Weiss#  The ASF licenses this file to You under the Apache License, Version 2.0
7627ef4d4SDawid Weiss#  the "License"); you may not use this file except in compliance with
8627ef4d4SDawid Weiss#  the License.  You may obtain a copy of the License at
9627ef4d4SDawid Weiss#
10627ef4d4SDawid Weiss#      http://www.apache.org/licenses/LICENSE-2.0
11627ef4d4SDawid Weiss#
12627ef4d4SDawid Weiss#  Unless required by applicable law or agreed to in writing, software
13627ef4d4SDawid Weiss#  distributed under the License is distributed on an "AS IS" BASIS,
14627ef4d4SDawid Weiss#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15627ef4d4SDawid Weiss#  See the License for the specific language governing permissions and
16627ef4d4SDawid Weiss#  limitations under the License.
17627ef4d4SDawid Weiss
18d973e50cSUwe SchindlerMODULES=`dirname "$0"`/..
19d973e50cSUwe SchindlerMODULES=`cd "$MODULES" && pwd`
20*81ab1e59SDawid Weiss
21*81ab1e59SDawid Weiss# check for overridden launch command (for use in integration tests), otherwise
22*81ab1e59SDawid Weiss# use the default.
23*81ab1e59SDawid Weissif [ -z "$LAUNCH_CMD" ]; then
24*81ab1e59SDawid Weiss  LAUNCH_CMD=java
25*81ab1e59SDawid Weiss  LAUNCH_OPTS=
26*81ab1e59SDawid Weisselse
27*81ab1e59SDawid Weiss  # We are integration-testing. Force UTF-8 as the encoding.
28*81ab1e59SDawid Weiss  LAUNCH_OPTS=-Dfile.encoding=UTF-8
29*81ab1e59SDawid Weissfi
30*81ab1e59SDawid Weiss
31*81ab1e59SDawid Weiss"$LAUNCH_CMD" $LAUNCH_OPTS --module-path "$MODULES/modules:$MODULES/modules-thirdparty" --module org.apache.lucene.luke "$@"
3272ba7ae2SDawid Weissexit $?
33