minetest/util/stress_mapgen.sh
grorp 4b90e582b4
Rename to Luanti (#15294)
The new header intentionally isn't in MTG stone design (or any other MTG-esque design), since we want to distance Luanti and MTG from each other. The font "undefined medium" (https://undefined-medium.com/) was used. 

ASCII art generated by https://patorjk.com/software/taag/#p=display&f=Graffiti&t=luanti
https://github.com/minetest/minetest/pull/11952#issuecomment-1013364703

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-10-27 14:04:51 +01:00

31 lines
808 B
Bash
Executable File

#!/bin/bash
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
gameid=${gameid:-devtest}
executable=$dir/../bin/luanti
testspath=$dir/../tests
conf_server=$testspath/server.conf
worldpath=$testspath/world
run () {
if [ -n "$PERF" ]; then
perf record -z --call-graph dwarf -- "$@"
else
"$@"
fi
}
[ -e "$executable" ] || { echo "executable $executable missing"; exit 1; }
rm -rf "$worldpath"
mkdir -p "$worldpath/worldmods"
settings=(sqlite_synchronous=0 helper_mode=mapgen)
[ -n "$PROFILER" ] && settings+=(profiler_print_interval=15)
printf '%s\n' "${settings[@]}" >"$testspath/server.conf" \
ln -s "$dir/helper_mod" "$worldpath/worldmods/"
args=(--config "$conf_server" --world "$worldpath" --gameid $gameid)
[ -n "$PROFILER" ] && args+=(--verbose)
run "$executable" --server "${args[@]}"