1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-17 07:50:29 +01:00
server-nalc/other_things/scripts/Server-side/upgrade-mff/upgrade-part-mff.sh

54 lines
2.7 KiB
Bash
Raw Normal View History

2015-09-08 19:36:28 +02:00
# On récupère la dernière version du jeu
cd /home/quentinbd/
2015-08-31 00:14:33 +02:00
git clone https://github.com/MinetestForFun/server-minetestforfun.git
echo "Clone de server-minetestforfun réussit."
cd /home/quentinbd/server-minetestforfun/
git submodule update --init --recursive
2015-09-08 19:36:28 +02:00
# On sauvegarde les anciens ../games et ../mods
rm -R /home/quentinbd/upgrade-mff/olds-part/games/
rm -R /home/quentinbd/upgrade-mff/olds-part/mods/
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
cp -R /home/quentinbd/mff/mods/ /home/quentinbd/upgrade-mff/olds-part/
cp -R /home/quentinbd/mff/games/ /home/quentinbd/upgrade-mff/olds-part/
echo "Sauvegarde de /mods et /games correctement effectuée."
2015-09-08 19:36:28 +02:00
# On MAJ les nouveaux minetest/games et minetest/mods
rm -R /home/quentinbd/mff/games/
rm -R /home/quentinbd/mff/mods/
2015-09-16 21:00:24 +02:00
mkdir -p /home/quentinbd/mff/games/
2015-08-31 00:14:33 +02:00
cp -R /home/quentinbd/server-minetestforfun/minetestforfun_game/ /home/quentinbd/mff/games/
cp -R /home/quentinbd/server-minetestforfun/mods/ /home/quentinbd/mff/
echo "Nouveaux /mods et /games correctement déplacés"
# On MAJ le minetest.conf, world.mt, random_messages, forbidden_names, et le news.txt
2015-09-16 21:00:24 +02:00
mkdir -p /home/quentinbd/mff/worlds/minetestforfun/
rm /home/quentinbd/mff/minetest.conf
rm /home/quentinbd/mff/worlds/minetestforfun/world.mt
2015-09-08 19:36:28 +02:00
rm /home/quentinbd/mff/worlds/minetestforfun/random_messages
rm /home/quentinbd/mff/worlds/minetestforfun/news.txt
2015-09-16 21:00:24 +02:00
rm /home/quentinbd/mff/worlds/minetestforfun/forbidden_names.txt
2015-09-08 19:36:28 +02:00
# On les remet
cp /home/quentinbd/server-minetestforfun/minetest.conf /home/quentinbd/mff/
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/world.mt /home/quentinbd/mff/worlds/minetestforfun/
2015-09-08 19:36:28 +02:00
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/random_messages /home/quentinbd/mff/worlds/minetestforfun/
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/news.txt /home/quentinbd/mff/worlds/minetestforfun/
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/forbidden_names.txt /home/quentinbd/mff/worlds/minetestforfun/
echo "Nouvelles news.txt, world.mt et random_messages correctement déplacé"
# TEMPORAIRE - ré-ajout de l'ancien mod irc
rm -R /home/quentinbd/mff/mods/irc/
cp -R /home/quentinbd/server-minetestforfun/other_things/irc-old-save/ /home/quentinbd/mff/mods/
mv /home/quentinbd/mff/mods/irc-old-save/ /home/quentinbd/mff/mods/irc/
echo "TEMPORAIRE - ré-ajout de l'ancien mod irc"
# Suppression du dossier cloné
rm -Rf /home/quentinbd/server-minetestforfun/
2015-09-08 19:36:28 +02:00
echo "Bravo ! mff/mods et mff/games maintenant à jour"
# On ré-attribut les droits à quentinbd et en 755
2015-09-08 19:36:28 +02:00
chown -R quentinbd:quentinbd /home/quentinbd/mff/
chmod -R 755 /home/quentinbd/mff/
echo "ré-attribution des droits à quentinbd:quentinbd"