1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-06 02:20:24 +01:00
server-nalc/other_things/scripts/Server-side/upgrade-mff-hg/upgrade-part-mff-hg.sh

52 lines
3.0 KiB
Bash
Raw Normal View History

# on récupère la dernière version du jeu
cd /home/quentinbd/
2015-08-31 00:18:42 +02:00
git clone https://github.com/MinetestForFun/server-minetestforfun-hungry_games.git
echo "Clone de server-minetestforfun-hungry_games réussit."
2015-08-31 00:18:42 +02:00
cd /home/quentinbd/server-minetestforfun-hungry_games/
git submodule update --init --recursive
# On sauvegarde les anciens ../games et ../mods
rm -R /home/quentinbd/upgrade-mff-hg/olds-part/games/
rm -R /home/quentinbd/upgrade-mff-hg/olds-part/mods/
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
cp -R /home/quentinbd/mff-hg/mods/ /home/quentinbd/upgrade-mff-hg/olds-part/
cp -R /home/quentinbd/mff-hg/games/ /home/quentinbd/upgrade-mff-hg/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-hg/mods/
2015-09-03 01:09:22 +02:00
rm -R /home/quentinbd/mff-hg/games/
2015-09-16 21:00:24 +02:00
mkdir -p /home/quentinbd/mff-hg/games/
mkdir -p /home/quentinbd/server-minetestforfun-hungry_games/games
mkdir -p /home/quentinbd/mff-hg/games/minetestforfun_hg/
mkdir -p /home/quentinbd/mff-hg/games/minetestforfun_hg/mods/
2015-09-03 01:09:22 +02:00
cp -R /home/quentinbd/server-minetestforfun-hungry_games/mods/ /home/quentinbd/mff-hg/games/minetestforfun_hg/
echo "Nouveaux /mods et /games correctement déplacés"
2015-09-16 21:00:24 +02:00
# On MAJ le minetest.conf, world.mt, random_messages, top_config.txt, et le forbidden_names
mkdir -p /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
rm /home/quentinbd/mff-hg/minetest.conf
2015-09-03 01:09:22 +02:00
rm /home/quentinbd/mff-hg/worlds/minetestforfun-hg/world.mt
rm /home/quentinbd/mff-hg/worlds/minetestforfun-hg/random_messages
rm /home/quentinbd/mff-hg/worlds/minetestforfun-hg/top_config.txt
rm /home/quentinbd/mff-hg/worlds/minetestforfun-hg/forbidden_names.txt
# On les remet
2015-09-03 01:09:22 +02:00
cp /home/quentinbd/server-minetestforfun-hungry_games/minetest.conf /home/quentinbd/mff-hg/games/minetestforfun_hg/
cp /home/quentinbd/server-minetestforfun-hungry_games/minetest.conf /home/quentinbd/mff-hg/
cp /home/quentinbd/server-minetestforfun-hungry_games/game.conf /home/quentinbd/mff-hg/games/minetestforfun_hg/
#cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/world.mt /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/random_messages /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/top_config.txt /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/forbidden_names.txt /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
2015-09-16 21:00:24 +02:00
echo "Nouveau minetest.conf, world.mt, random_messages, top_config.txt, et le forbidden_names correctement déplacé"
# Suppression du dossier cloné
2015-08-31 00:18:42 +02:00
rm -Rf /home/quentinbd/server-minetestforfun-hungry_games/
echo "Bravo ! mff-hg/mods et mff-hg/games maintenant à jour"
# On ré-attribut les droits à quentinbd et en 755
chown -R quentinbd:quentinbd /home/quentinbd/mff-hg/
chmod -R 755 /home/quentinbd/mff-hg/
echo "ré-attribution des droits à quentinbd:quentinbd"