1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 00:08:25 +01:00
server-nalc/other_things/scripts/Server-side/upgrade-mff-creative/upgrade-part-mff-creative.sh

51 lines
3.2 KiB
Bash
Raw Normal View History

2015-09-14 22:06:58 +02:00
# on récupère la dernière version du jeu
cd /home/quentinbd/
git clone https://github.com/MinetestForFun/server-minetestforfun-creative.git
echo "Clone de server-minetestforfun-creative réussit."
cd /home/quentinbd/server-minetestforfun-creative/
git submodule update --init --recursive
# On sauvegarde les anciens ../games et ../mods
rm -R /home/quentinbd/upgrade-mff-creative/olds-part/games/
rm -R /home/quentinbd/upgrade-mff-creative/olds-part/mods/
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
cp -R /home/quentinbd/mff-creative/mods/ /home/quentinbd/upgrade-mff-creative/olds-part/
cp -R /home/quentinbd/mff-creative/games/ /home/quentinbd/upgrade-mff-creative/olds-part/
echo "Sauvegarde de /mods et /games correctement effectuée."
# On MAJ les nouveaux minetest/games et minetest/mods
rm -R /home/quentinbd/mff-creative/mods/
rm -R /home/quentinbd/mff-creative/games/
2015-09-16 21:00:24 +02:00
mkdir -p /home/quentinbd/mff-creative/games/
cp -R /home/quentinbd/server-minetestforfun-creative/minetestforfun_game/ /home/quentinbd/mff-creative/games/
mv /home/quentinbd/mff-creative/games/minetestforfun_game/ /home/quentinbd/mff-creative/games/minetestforfun_creative/
2015-09-16 21:00:24 +02:00
mkdir -p /home/quentinbd/mff-creative/games/minetestforfun_creative/
mkdir -p /home/quentinbd/mff-creative/games/minetestforfun_creative/mods/
cp -R /home/quentinbd/server-minetestforfun-creative/mods/ /home/quentinbd/mff-creative/
2015-09-14 22:06:58 +02:00
echo "Nouveaux /mods et /games correctement déplacés"
2015-09-16 21:00:24 +02:00
# On MAJ le minetest.conf, game.conf, world.mt, random_messages, et le forbidden_names
mkdir -p /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
cp /home/quentinbd/server-minetestforfun-creative/minetestforfun_game/game.conf /home/quentinbd/mff-creative/games/minetestforfun_creative/
2015-09-14 22:06:58 +02:00
rm /home/quentinbd/mff-creative/minetest.conf
rm /home/quentinbd/mff-creative/worlds/minetestforfun-creative/world.mt
rm /home/quentinbd/mff-creative/worlds/minetestforfun-creative/random_messages
# On les remet
cp /home/quentinbd/server-minetestforfun-creative/minetest.conf /home/quentinbd/mff-creative/games/minetestforfun_creative/
cp /home/quentinbd/server-minetestforfun-creative/minetest.conf /home/quentinbd/mff-creative/
cp /home/quentinbd/server-minetestforfun-creative/minetestforfun_game/game.conf /home/quentinbd/mff-creative/games/minetestforfun_creative/
cp /home/quentinbd/server-minetestforfun-creative/worlds/minetestforfun-creative/world.mt /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
2015-09-14 22:06:58 +02:00
cp /home/quentinbd/server-minetestforfun-creative/worlds/minetestforfun-creative/random_messages /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
cp /home/quentinbd/server-minetestforfun-creative/worlds/minetestforfun-creative/forbidden_names.txt /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
2015-09-16 21:00:24 +02:00
echo "Nouveau minetest.conf, game.conf, world.mt, random_messages, et le forbidden_names correctement déplacé"
2015-09-14 22:06:58 +02:00
# Suppression du dossier cloné
rm -Rf /home/quentinbd/server-minetestforfun-creative/
echo "Bravo ! mff-creative/mods et mff-creative/games maintenant à jour"
# On ré-attribut les droits à quentinbd et en 755
chown -R quentinbd:quentinbd /home/quentinbd/mff-creative/
chmod -R 755 /home/quentinbd/mff-creative/
echo "ré-attribution des droits à quentinbd:quentinbd"