Last active
April 23, 2020 06:01
-
-
Save AntumDeluge/d5ee66322d6182cb658af7248fcbc51c to your computer and use it in GitHub Desktop.
Shell script for launching Stendhal server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Public Domain dedication: | |
# | |
# The author hereby relinquishes all rights to this work & dedicates | |
# it to the Public Domain via Creative Commons Zero (CC0). See: | |
# https://creativecommons.org/licenses/publicdomain/ | |
# change this path to root installation directory of Stendhal server | |
server_root="." | |
if test -f "${server_root}"; then | |
echo "\"$server_root\" is a file" | |
# EEXIST | |
exit 17 | |
elif test ! -d "${server_root}"; then | |
echo "\"$server_root\" does not exist" | |
# ENOENT | |
exit 2 | |
fi | |
CLASSPATH="./:./build/build_server/:./build/build_server_maps/:./build/build_server_mods/:./build/build_server_script/:./build/build_server_xmlconf/:./libs/*" | |
# Some influencial properties (use: -Dproperty) | |
# | |
# Occasions: | |
# stendhal.testserver: put in test server mode | |
# stendhal.christmas: loads Christmas maps | |
# stendhal.santa: enables Santa NPC | |
# stendhal.easter: loads Easter maps | |
# stendhal.easterbunny: enables Easter Bunny NPC | |
# stendhal.minetown: loads Minetown Weeks maps | |
# | |
# Testing: | |
# DEBUG: general debugging | |
# testing: general testing | |
# testing.action: player action tests | |
# testing.chat: chat system tests | |
# testing.combat: combat system tests | |
# testing.movement: entity movement tests | |
# testing.outfit: outfit system tests | |
# testing.quest: quest system tests | |
args="$@" | |
echo -e "\nExecuting Stendhal server: java -cp \"\${CLASSPATH}\" ${args} \"games.stendhal.server.StendhalServer\"\n" | |
cd "${server_root}" && java -cp "${CLASSPATH}" ${args} "games.stendhal.server.StendhalServer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment