mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
add some server side scripts and re-organize the script folder
This commit is contained in:
21
other_things/scripts/Git/rebase_active_branches.sh
Executable file
21
other_things/scripts/Git/rebase_active_branches.sh
Executable file
@ -0,0 +1,21 @@
|
||||
# Rebase actives branches
|
||||
# Script by LeMagnesium (20/12/15)
|
||||
# @param : Branches to rebase from master
|
||||
# Must be ran from the root of the repo or a subdirectory
|
||||
|
||||
for branch in $( git branch ); do
|
||||
if [ branch != "master" ];
|
||||
then
|
||||
git checkout $branch
|
||||
git pull origin $branch
|
||||
git rebase master
|
||||
git push -f origin $branch
|
||||
fi
|
||||
done
|
||||
|
||||
git checkout master
|
||||
|
||||
echo "Branches rebased."
|
||||
|
||||
|
||||
#EOF
|
17
other_things/scripts/Git/remove_whitespaces.sh
Executable file
17
other_things/scripts/Git/remove_whitespaces.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Script to remove whitespaces from our repository's lua files
|
||||
# Script ßý LeMagnesium, 2015
|
||||
# (Note: You need this : https://github.com/LeMagnesium/mucro )
|
||||
|
||||
# Go to repo root
|
||||
mydir="`dirname "$0"`"
|
||||
test -d "$mydir" && cd "$mydir/../../"
|
||||
|
||||
# Get all lua file's names
|
||||
luafiles=$(mucro '.lua'$ -r . -b)
|
||||
sed -i 's/[ \t]*$//' $luafiles
|
||||
|
||||
# Done
|
||||
echo "Done"
|
||||
|
||||
#EOF
|
15
other_things/scripts/Git/reverse-mff.sh
Executable file
15
other_things/scripts/Git/reverse-mff.sh
Executable 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"
|
34
other_things/scripts/Git/update-mff.sh
Executable file
34
other_things/scripts/Git/update-mff.sh
Executable 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
|
Reference in New Issue
Block a user