source: other-projects/tipple-android/osmosis/bin/osmosis-extract-apidb-0.6@ 26899

Last change on this file since 26899 was 26899, checked in by davidb, 11 years ago

Tipple reborn after Chris's Summer of Code 2013

File size: 1.4 KB
Line 
1#!/bin/sh
2
3# Config files can define several variables used throughout this script.
4# JAVACMD - The java command to launch osmosis.
5# JAVACMD_OPTIONS - The options to append to the java command, typically used to modify jvm settings such as max memory.
6
7if [ -f /etc/osmosis ] ; then
8 . /etc/osmosis
9fi
10
11if [ -f "$HOME/.osmosis" ] ; then
12 . "$HOME/.osmosis"
13fi
14
15if [ -z "$JAVACMD" ] ; then
16 # No JAVACMD provided in osmosis config files, therefore default to java
17 JAVACMD=java
18fi
19
20## resolve links - $0 may be a link to application
21PRG="$0"
22
23# if started without absolute path, but from PATH environment
24if [ ! -s "$PRG" ] ; then
25 PRG=`which $PRG`
26fi
27
28# need this for relative symlinks
29while [ -h "$PRG" ] ; do
30 ls=`ls -ld "$PRG"`
31 link=`expr "$ls" : '.*-> \(.*\)$'`
32 if expr "$link" : '/.*' > /dev/null; then
33 PRG="$link"
34 else
35 PRG="`dirname "$PRG"`/$link"
36 fi
37done
38
39# make it fully qualified
40saveddir=`pwd`
41MYAPP_HOME=`dirname "$PRG"`/..
42MYAPP_HOME=`cd "$MYAPP_HOME" && pwd`
43cd "$saveddir"
44
45# Build up the classpath of required jar files.
46MYAPP_CLASSPATH=$MYAPP_HOME/osmosis.jar:$OSMOSIS_CLASSPATH
47for FILE in `ls $MYAPP_HOME/lib/default/`; do
48 MYAPP_CLASSPATH=$MYAPP_CLASSPATH:$MYAPP_HOME/lib/default/$FILE
49done
50
51MAINCLASS=org.openstreetmap.osmosis.extract.apidb.v0_6.OsmosisExtractApiDb
52EXEC="$JAVACMD $JAVACMD_OPTIONS -cp $MYAPP_CLASSPATH $MAINCLASS $@"
53
54exec $EXEC
Note: See TracBrowser for help on using the repository browser.