File: basexserver

package info (click to toggle)
basex 7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,924 kB
  • sloc: java: 86,870; xml: 921; sh: 149; makefile: 5
file content (32 lines) | stat: -rwxr-xr-x 690 bytes parent folder | download
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
#!/bin/bash

# Path to this script
FILE="${BASH_SOURCE[0]}"
while [ -h "$FILE" ] ; do
  SRC="$(readlink "$FILE")"
  FILE="$( cd -P "$(dirname "$FILE")" && \
           cd -P "$(dirname "$SRC")" && pwd )/$(basename "$SRC")"
done
BX="$( cd -P "$(dirname "$FILE")/.." && pwd )"

# Core and library classes
CP="$BX/target/classes"
CP="$CP$(for JAR in "$BX"/lib/*.jar; do echo -n ":$JAR"; done)"

# Options for virtual machine
VM=-Xmx512m

general_args=( )
vm_args=( )
while (( $# )) ; do
  if [[ $1 = "-X" ]] ; then
    vm_args+=( "$2" )
    shift 2
  else
    general_args+=( "$1" )
    shift
  fi
done

# Run code
java -cp "$CP" $VM "${vm_args[@]}" org.basex.BaseXServer "${general_args[@]}"