1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-13 22:10:31 +01:00
server-nalc/other_things/scripts/Server-side/upgrade-mff-hg/upgrade-part-mff-hg.sh

51 lines
2.8 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/
mkdir /home/quentinbd/mff-hg/games/
2015-09-03 01:09:22 +02:00
mkdir /home/quentinbd/server-minetestforfun-hungry_games/games
mkdir /home/quentinbd/mff-hg/games/minetestforfun_hg/
mkdir /home/quentinbd/mff-hg/games/minetestforfun_hg/mods/
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-03 01:09:22 +02:00
# On MAJ le minetest.conf, game.conf, world.mt, et le random_messages
mkdir /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
# 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/
2015-08-31 00:18:42 +02:00
cp /home/quentinbd/server-minetestforfun-hungry_games/minetest.conf /home/quentinbd/mff-hg/
2015-09-03 01:09:22 +02:00
#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/
echo "Nouveau 'minetest.conf, game.conf, world.mt, et le random_messages' 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"