Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f454b1c192f4d577558edd61005ee3dc > files > 2

mars-sim-2.84-6.fc14.src.rpm

#!/bin/bash
# 
# Mars Simulation Project script
# Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then 
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Load system-wide configuration
if [ -f /etc/mars-sim.conf ]; then
  . /etc/mars-sim.conf
fi

# Load user configuration
if [ -f "$HOME/.mars-simrc" ]; then
  . "$HOME/.mars-simrc"
fi

# Rest of the configuration
MAIN_CLASS=org.mars_sim.msp.MarsProject

# MSP itself
BASE_JARS="$BASE_JARS mars-sim/msp-simulation.jar"
BASE_JARS="$BASE_JARS mars-sim/map_data.jar"
BASE_JARS="$BASE_JARS mars-sim/msp-standard-ui.jar"
BASE_JARS="$BASE_JARS mars-sim/MarsProject.jar"

# Dependencies
BASE_JARS="$BASE_JARS commons-collections"
BASE_JARS="$BASE_JARS plexus-graph"
BASE_JARS="$BASE_JARS jfreechart"
BASE_JARS="$BASE_JARS log4j"
BASE_JARS="$BASE_JARS xerces-j2"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $OPENGROK_OPTS

CLASSPATH="/usr/share/java/mars-sim:$CLASSPATH"

if [ \! -d "$HOME/.mars-sim/conf" ] || [ \! -d "$HOME/.mars-sim/saved" ]
then
	mkdir -p "$HOME/.mars-sim"
	cp -rp /usr/share/mars-sim/{conf,saved} "$HOME/.mars-sim"
fi

# Let's start
cd "$HOME/.mars-sim"
run "$@"