added helper scripts to repo

This commit is contained in:
krumel
2022-06-12 11:08:55 +02:00
parent aef7f46724
commit 54ae6414da
4 changed files with 85 additions and 1 deletions

32
refreshmods.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# if you cloned this from the repository, you might have to edit your paths
# this is mainly for me, so I can easily update the pack on the server
echo "Sync mods"
rsync -Pr --delete --filter="- /user/" --filter="- /.old/" ~/Games/Minecraft/modpack_dev/ ~/.local/share/PolyMC/instances/modpack_dev/.minecraft/mods/
echo "Create modlist"
echo "# Automatically downloaded" > modlist.md
ferium list >> modlist.md
echo "# Manually downloaded" >> modlist.md
ls ~/Games/Minecraft/modpack_dev/user >> modlist.md
# add extra newlines
gawk -i inplace 1 ORS='\n\n' modlist.md
echo "Zip the mods"
tar -czvf /tmp/krumels_pack_dev_$(date -Idate -u).tar.gz mods
echo "Move mods to the webroot"
rsync -e ssh /tmp/krumels_pack_dev_$(date -Idate -u).tar.gz minecraft@krumel.moe:~/webroot/mods
echo "Sync mods with server"
rsync -Pr --delete --filter="- /DistantHorizons-*" mods/ minecraft@krumel.moe:~/Krumelcraft/mods/
echo "Sync config with server"
rsync -Pr --delete config/ minecraft@krumel.moe:~/Krumelcraft/config/
echo "Sync level-config with server"
rsync -Pr --delete saves/world/serverconfig/ minecraft@krumel.moe:~/Krumelcraft/world/serverconfig