Minecraft world download flow

This commit is contained in:
h3lp
2026-03-11 16:31:08 +02:00
parent 216cde95c5
commit 946366309c
3 changed files with 35 additions and 0 deletions
+6
View File
@@ -4,4 +4,10 @@
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-25.11
java -Xmx8192M -Xms6144M -jar minecraft_server.jar nogui
read -rp "Pack and publish world? [y/N] " answer
if [[ "$answer" =~ ^[Yy]$ ]]; then
/home/h3lp/mineserver/packworld.sh
fi
read -rp "Press Enter to continue..."
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p gnutar xz
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-25.11
set -e
WORLD=/home/h3lp/mineserver/world
OUTPUT=/var/www/hostedfiles/world.tar.xz
TMP=$(mktemp)
tar -cJf "$TMP" -C "$WORLD" .
mv "$TMP" "$OUTPUT"
echo "Done: $OUTPUT"