Skip to content

Instantly share code, notes, and snippets.

@AntumDeluge
Created June 22, 2023 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntumDeluge/aea8990e792475379cc1052e0a444159 to your computer and use it in GitHub Desktop.
Save AntumDeluge/aea8990e792475379cc1052e0a444159 to your computer and use it in GitHub Desktop.
Shell script to run Stendhal combat simulation.
#!/usr/bin/env bash
classpath="./:./libs/*:./build/build_stendhaltools/:./build/build_server/:./build/build_server_script/:./build/build_server_maps/:./build/build_server_xmlconf/"
defines=()
params=()
for arg in "$@"; do
echo "${arg}" | grep -q "^\-D";
ret=$?
if [[ ${ret} -eq 0 ]]; then
defines+=("${arg}");
else
params+=("${arg}")
fi
done
java -cp ${classpath} "${defines[@]}" games.stendhal.tools.SimulateCombat "${params[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment