1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 15:30:30 +01:00

Added update/reverse script template

This commit is contained in:
LeMagnesium 2015-04-18 17:34:33 +02:00
parent 2cb0ad809f
commit e310eacb47
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Reversing script
cd ~/Programmation/Gits/Ombridride-minetest-minetestforfun-server-access/
# Removed old files... While saving IRC mod
rm -rf ./mods/*
rm -rf ./minetestforfun_game/*
# Copy files
cp -Rf ~/.minetest/worlds/NodesJustWannaHaveFun/worldmods/* ./mods/
cp -Rf ~/.minetest/games/minetestforfun_game/* ./minetestforfun_game/
echo "Finished"

View File

@ -0,0 +1,34 @@
#!/bin/bash
# Update MinetestForFun Sources
datecom=`date`
echo "[$datecom] Updated MinetestForFun Sources by $USER" >> ~/.git_sh_history
cd ~/Programmation/
cd Gits/Ombridride-minetest-minetestforfun-server-access
# If argument is passed, then update the clone
if [ ! -z $1 ]
then
echo "=> Getting lastest sources..."
# Actualize MFF's clone
git checkout master
git pull origin master
else
echo "=> Skipping clone actualization"
fi
echo "=> Copying files..."
cd mods
rm -rf ~/.minetest/worlds/NodesJustWannaHaveFun/worldmods/*
cp -R ./* ~/.minetest/worlds/NodesJustWannaHaveFun/worldmods/
cd ..
rm -rf ~/.minetest/games/minetestforfun_game
cp -r ./minetestforfun_game ~/.minetest/games
cp -f ./worlds/minetestforfun/news.txt ~/.minetest/worlds/NodesJustWannaHaveFun/
echo "== Finished =="
sleep 2