36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/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"
|
|
rm /tmp/krumels_pack_dev_$(date -Idate -u).tar.gz
|
|
tar -czvf /tmp/krumels_pack_dev_$(date -Idate -u).tar.gz mods config
|
|
|
|
echo "Move mods to the webroot"
|
|
rsync -e ssh /tmp/krumels_pack_dev_$(date -Idate -u).tar.gz minecraft@krumel.moe:~/webroot/mods
|
|
|
|
for tgt in "minecraft@krumel.moe:~/Krumelcraft" "minecraft@192.168.2.80:~/server/Krumelcraft"
|
|
do
|
|
echo "Sync mods with server"
|
|
rsync -Pr --delete --filter="- /DistantHorizons-*" mods/ $tgt/mods/
|
|
|
|
echo "Sync config with server"
|
|
rsync -Pr --delete config/ $tgt/config/
|
|
|
|
echo "Sync level-config with server"
|
|
rsync -Pr --delete saves/world/serverconfig/ $tgt/world/serverconfig
|
|
done |