mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Remove other_things (moved to another repo)
This is a step to reorganization
This commit is contained in:
@ -1,182 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
import sys, os, sqlite3
|
||||
import encodings, calendar, time
|
||||
from cStringIO import StringIO
|
||||
|
||||
home = os.environ.get("HOME")
|
||||
db = "%s/rollback/rollback.sqlite" % (home)
|
||||
|
||||
#[id=6,actor=Mg,type=1;list=None,index=None,add=None,stacknode=None,stackquantity=None;x=252,y=59,z=-401;newnode=air,newparam1=15,newparam2=None,newmeta=None]
|
||||
|
||||
class Convert_id(object):
|
||||
def __init__(self, base):
|
||||
self.__players = dict()
|
||||
self.__nodes = dict()
|
||||
try:
|
||||
conn = sqlite3.connect(db)
|
||||
cur = conn.cursor()
|
||||
except Exception as err:
|
||||
print(err)
|
||||
print("problème avec la base de données")
|
||||
sys.exit(1)
|
||||
else:
|
||||
try:
|
||||
cur.execute("SELECT * from actor")
|
||||
except sqlite3.OperationalError as err:
|
||||
print(err)
|
||||
else:
|
||||
result = cur.fetchall()
|
||||
for res in result:
|
||||
self.__players[res[0]] = res[1][len("player:"):]
|
||||
try:
|
||||
cur.execute("SELECT * from node")
|
||||
except sqlite3.OperationalError as err:
|
||||
print(err)
|
||||
else:
|
||||
result = cur.fetchall()
|
||||
for res in result:
|
||||
self.__nodes[res[0]] = res[1]
|
||||
finally:
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
def get_player_name(self, player_id):
|
||||
if self.__players.has_key(player_id):
|
||||
return self.__players[player_id]
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_node_name(self, node_id):
|
||||
if self.__nodes.has_key(node_id):
|
||||
return self.__nodes[node_id]
|
||||
else:
|
||||
return None
|
||||
|
||||
########################################################################
|
||||
## Utilities
|
||||
#
|
||||
|
||||
def ston(a):
|
||||
"""
|
||||
Returns a string equal to a or None
|
||||
"""
|
||||
if a:
|
||||
return str(a)
|
||||
else:
|
||||
return None
|
||||
|
||||
def select_all_nodes(startstamp, endstamp):
|
||||
try:
|
||||
conn = sqlite3.connect(db)
|
||||
conn.text_factory = str
|
||||
cur = conn.cursor()
|
||||
except sqlite3.OperationalError as err:
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
try:
|
||||
# x because we need position
|
||||
cur.execute("SELECT * FROM action WHERE x AND timestamp >=:startstamp AND timestamp < :endstamp", {"startstamp":startstamp, "endstamp":endstamp})
|
||||
except sqlite3.OperationalError as err:
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
else:
|
||||
result = cur.fetchall()
|
||||
finally:
|
||||
cur.close()
|
||||
conn.close()
|
||||
return(result)
|
||||
|
||||
|
||||
# Big-endian!!!
|
||||
def readU16(strm):
|
||||
return (ord(strm.read(1)) << 16) + (ord(strm.read(1)))
|
||||
|
||||
def readU32(strm):
|
||||
return (ord(strm.read(1)) << 24) + (ord(strm.read(1)) << 16) + (ord(strm.read(1)) << 8) + (ord(strm.read(1)))
|
||||
|
||||
def decode(chaine):
|
||||
if not chaine :
|
||||
return None
|
||||
else:
|
||||
strm = StringIO(chaine)
|
||||
table = "["
|
||||
nEntries = readU32(strm)
|
||||
for n in range(nEntries):
|
||||
keyLen = readU16(strm)
|
||||
key = strm.read(keyLen)
|
||||
valLen = readU32(strm)
|
||||
val = strm.read(valLen)
|
||||
# Beware of potential quotes in meta, they must be escaped
|
||||
# Fortunately their escape codes are the same in Python and Lua
|
||||
# (and pretty much every language influenced by C)
|
||||
# ------------
|
||||
# Attention aux potentiels quotes dedans les meta, il faut les escape
|
||||
# Heureusement leur mode d'escape est quasi le même en Python que Lua
|
||||
table += '%s="%s"' % (key, val.encode('string-escape').replace('"', '\\"'))
|
||||
if n != nEntries-1:
|
||||
table += ","
|
||||
table += "]"
|
||||
return table
|
||||
|
||||
|
||||
|
||||
def to_table(node):
|
||||
# Init bracket and basic datas
|
||||
table = "["
|
||||
table += 'id=%d' % node[0]
|
||||
table += ',actor=%s' % Id.get_player_name(node[1])
|
||||
table += ',type=%d' % node[3]
|
||||
# Inventory Manipulation
|
||||
table += ';list=%s' % node[4]
|
||||
table += ',index=%s' % node[5]
|
||||
table += ',add=%s' % node[6]
|
||||
table += ',stacknode=%s' % Id.get_node_name(node[7])
|
||||
table += ',stackquantity=%s' % node[8]
|
||||
# Position
|
||||
table += ';x=%s,y=%s,z=%s' % (node[10], node[11], node[12])
|
||||
# New node
|
||||
table += ';newnode=%s' % Id.get_node_name(node[17])
|
||||
table += ',newparam1=%s' % ston(node[18])
|
||||
table += ',newparam2=%s' % ston(node[19])
|
||||
table += ',newmeta=%s' % decode(node[20])
|
||||
# Ending
|
||||
table += ']\n'
|
||||
return (table)
|
||||
|
||||
def write_list(nodes, i):
|
||||
try:
|
||||
name = "rollback/database-output.%s.txt" % i
|
||||
f = open(name, "w")
|
||||
except Exception as err:
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
|
||||
for node in nodes:
|
||||
table = to_table(node)
|
||||
f.write(table)
|
||||
f.close()
|
||||
|
||||
|
||||
########################################################################
|
||||
## Main
|
||||
#
|
||||
|
||||
if __name__ == '__main__':
|
||||
Id = Convert_id(db)
|
||||
#select all nodes player as set i where time >= time
|
||||
#timestamp = 1426978800
|
||||
timestamp = 0
|
||||
i = 0
|
||||
while timestamp <= time.time():
|
||||
all_nodes = select_all_nodes(timestamp, timestamp+24*60*60)
|
||||
if len(all_nodes) > 0:
|
||||
write_list(all_nodes, i)
|
||||
i += 1
|
||||
print("%s (%s) to %s (%s) => %s entries" % (
|
||||
time.strftime("%m/%d/%Y", time.gmtime(timestamp)), timestamp,
|
||||
time.strftime("%m/%d/%Y", time.gmtime(timestamp+24*60*60)), timestamp+24*60*60,
|
||||
len(all_nodes))
|
||||
)
|
||||
timestamp += 24*60*60
|
||||
|
@ -1,21 +0,0 @@
|
||||
# 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
|
@ -1,17 +0,0 @@
|
||||
#!/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=$(find -type f -name "*.lua")
|
||||
sed -i 's/[ \t]*$//' $luafiles
|
||||
|
||||
# Done
|
||||
echo "Done"
|
||||
|
||||
#EOF
|
@ -1,15 +0,0 @@
|
||||
# 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"
|
@ -1,34 +0,0 @@
|
||||
#!/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
|
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script created by LeMagnesium on 4/18/15
|
||||
# This script should be launched from the root of the clone or deeper in it
|
||||
# It copies all the meshes from homdecor from the mmdb's copy I have to our
|
||||
# own version
|
||||
# @param : $1 or the fresh clone from the mmdb's path while $2 is the static
|
||||
# path to our version
|
||||
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Missing parameter : source"
|
||||
else
|
||||
if [ -z $2 ]
|
||||
then
|
||||
echo "Missing parameter : target"
|
||||
else
|
||||
cp $1/lavalamp/models/* $2/lavalamp/models/
|
||||
cp $1/chains/models/* $2/chains/models/
|
||||
cp $1/computer/models/* $2/computer/models/
|
||||
cp $1/plasmascreen/models/* $2/plasmascreen/models/
|
||||
cp $1/homedecor_3d_extras/models/* $2/homedecor_3d_extras/models/
|
||||
cp $1/inbox/models/* $2/inbox/models/
|
||||
cp $1/homedecor/models/* $2/homedecor/models/
|
||||
cp $1/lrfurn/models/* $2/lrfurn/models/
|
||||
echo "Done."
|
||||
fi
|
||||
fi
|
@ -1,76 +0,0 @@
|
||||
#!/usr/bin/python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
## script to display diplicated textures in mods and subgame
|
||||
## by Crabman
|
||||
## ./find_duplicate_textures.py /path_to_/minetest-minetestforfun-server or ../../path_to_/minetest-minetestforfun-server or ../../
|
||||
|
||||
import sys, os, glob
|
||||
|
||||
def format_center(string, lt):
|
||||
# " string " lt=string total
|
||||
return (('{:^%s}' % lt).format(string) )
|
||||
|
||||
def format_left(string, lt):
|
||||
# "string " lt=string total
|
||||
return (('{:<%s}' % lt).format(string) )
|
||||
|
||||
def format_right(string, lt):
|
||||
# " string" lt=string total
|
||||
return (('{:>%s}' % lt).format(string) )
|
||||
|
||||
|
||||
class Textures:
|
||||
def __init__(self):
|
||||
self.textures_list = dict()
|
||||
self.duplicated = 0
|
||||
|
||||
def get_duplicate_nb(self):
|
||||
return self.duplicated
|
||||
|
||||
def get_nb(self):
|
||||
return len(self.textures_list)
|
||||
|
||||
def set_textures(self, files):
|
||||
for texture in files:
|
||||
path, name = os.path.split(texture)
|
||||
if self.textures_list.has_key(name):
|
||||
if len(self.textures_list[name]) == 1:
|
||||
self.duplicated += 1
|
||||
self.textures_list[name].append(path)
|
||||
else:
|
||||
self.textures_list[name] = [path]
|
||||
|
||||
def show_duplicate(self):
|
||||
for t, l in self.textures_list.iteritems():
|
||||
nb = len(l)
|
||||
if nb > 1:
|
||||
print("%s: %s %s" % (nb, format_left(t, 40), l) )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) <=1:
|
||||
print("Missing arg path!")
|
||||
sys.exit(1)
|
||||
|
||||
if sys.argv[1].startswith("/"):
|
||||
dir_path = sys.argv[1]
|
||||
else:
|
||||
dir_path = os.path.join(os.getcwd(), sys.argv[1])
|
||||
|
||||
try:
|
||||
os.chdir(dir_path)
|
||||
except Exception as err:
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
|
||||
T = Textures()
|
||||
# find in subgame/mods and mods
|
||||
for f in ["*/mods", "mods"]:
|
||||
files = glob.glob( os.path.join(f,'*/textures/*.png') ) # find in mods
|
||||
T.set_textures(files)
|
||||
files = glob.glob( os.path.join(f,'*/*/textures/*.png') ) # find in modpack
|
||||
T.set_textures(files)
|
||||
print("%s textures total %s duplicated\n" % ( T.get_nb(), T.get_duplicate_nb() ) )
|
||||
T.show_duplicate()
|
||||
|
@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
##########################
|
||||
## Skin Preview Generator
|
||||
## ßÿ Mg / LeMagnesium
|
||||
## License : WTFPL
|
||||
##
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
from PIL import Image
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
try:
|
||||
open(arg)
|
||||
except Exception as err:
|
||||
print("Couldn't open {} : {}".format(os.path.basename(arg), err))
|
||||
continue
|
||||
|
||||
im = Image.open(arg).convert("RGBA")
|
||||
print("Opened {}".format(os.path.basename(arg)))
|
||||
|
||||
s = im.size
|
||||
if not s[0] == s[1] * 2:
|
||||
print("Invalid size : {}".format(s))
|
||||
continue
|
||||
|
||||
cw = int(s[0] / 8)
|
||||
|
||||
# backp = Image.new("RGBA", (cw * 2, cw * 4))
|
||||
|
||||
head = im.crop(box = (cw, cw, cw * 2, cw * 2))
|
||||
chest = im.crop(box = (
|
||||
cw * 2 + int(1/2.0 * cw),
|
||||
cw * 2 + int(1/2.0 * cw),
|
||||
cw * 3 + int(1/2.0 * cw),
|
||||
s[1],
|
||||
))
|
||||
leftarm = im.crop(box = (
|
||||
5 * cw + int(cw / 2),
|
||||
2 * cw + int(cw / 2),
|
||||
6 * cw,
|
||||
s[1]
|
||||
))
|
||||
rightarm = im.crop(box = (
|
||||
6 * cw,
|
||||
2 * cw + int(cw / 2),
|
||||
6 * cw + int(cw / 2),
|
||||
s[1]
|
||||
))
|
||||
leftleg = im.crop(box = (
|
||||
int(1/2 * cw),
|
||||
2 * cw + int(cw / 2),
|
||||
cw,
|
||||
s[1]
|
||||
))
|
||||
|
||||
# Paste
|
||||
front = Image.new("RGBA", (
|
||||
cw * 2, # + int(2/8.0 * cw),
|
||||
cw * 4
|
||||
))
|
||||
for y in range(front.size[0]):
|
||||
for x in range(front.size[1]):
|
||||
front.putpixel((y, x), (255, 255, 255, 0))
|
||||
|
||||
front.paste(head, box = (
|
||||
int(cw / 2),
|
||||
0,
|
||||
))
|
||||
|
||||
front.paste(chest, box = (
|
||||
int(cw / 2),
|
||||
cw
|
||||
))
|
||||
|
||||
front.paste(leftarm, box = (
|
||||
0,
|
||||
cw
|
||||
))
|
||||
|
||||
front.paste(leftarm, box = (
|
||||
int(1.5 * cw),
|
||||
cw
|
||||
))
|
||||
|
||||
front.paste(leftleg, box = (
|
||||
int(cw / 2),
|
||||
int(2.5 * cw)
|
||||
))
|
||||
|
||||
front.paste(leftleg, box = (
|
||||
cw,
|
||||
int(2.5 * cw)
|
||||
))
|
||||
|
||||
exts = os.path.splitext(arg)
|
||||
front.save("{}_preview{}".format(exts[0], "".join(exts[1:])))
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to chmod all files in the repository at 755
|
||||
# Script ßý LeMagnesium
|
||||
#
|
||||
|
||||
# Go to repo root
|
||||
mydir="`dirname "$0"`"
|
||||
test -d "$mydir" && cd "$mydir/../../"
|
||||
|
||||
# CHMOD TIME!
|
||||
chmod -R 755 .
|
||||
echo "All files have been chmod-ed to mode 755."
|
||||
|
||||
#EOF
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
#rsync -e "ssh -i /root/.ssh/id_dsa" -av --delete-after /home/quentinbd/minetest/worlds/minetestforfun/news.txt root@192.168.1.20:/var/www/wordpress/wp-content/uploads/news/
|
||||
# Check the public key rights
|
||||
chmod 600 /home/quentinbd/.ssh/id_rsa
|
||||
chmod 600 /home/quentinbd/.ssh/id_rsa.pub
|
||||
# Begin the RSYNC
|
||||
rsync -azrv --delete /home/quentinbd/mff/worlds/minetestforfun/news.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/news/
|
||||
echo "Transfert réussi de news.txt sur le wordpress"
|
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEBUG='/home/quentinbd/script/debug-mff-creative.txt'
|
||||
MOREDEBUG='/home/quentinbd/script/moredebug-mff-creative.txt'
|
||||
|
||||
cd /home/quentinbd/mff-creative
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 5
|
||||
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
|
||||
echo "0" >/tmp/players_c.txt
|
||||
|
||||
/home/quentinbd/mff-creative/bin/minetestserver \
|
||||
--world /home/quentinbd/mff-creative/worlds/minetestforfun-creative/ \
|
||||
--config /home/quentinbd/mff-creative/minetest.conf \
|
||||
--gameid minetestforfun_creative \
|
||||
--port 30088 \
|
||||
# --logfile $DEBUG
|
||||
|
||||
sleep 25
|
||||
done &>> $MOREDEBUG
|
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEBUG='/home/quentinbd/script/debug-mff-hg.txt'
|
||||
MOREDEBUG='/home/quentinbd/script/moredebug-mff-hg.txt'
|
||||
|
||||
cd /home/quentinbd/mff-hg
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 5
|
||||
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
|
||||
echo "0" >/tmp/players_c.txt
|
||||
|
||||
/home/quentinbd/mff-hg/bin/minetestserver \
|
||||
--world /home/quentinbd/mff-hg/worlds/minetestforfun-hg/ \
|
||||
--config /home/quentinbd/mff-hg/minetest.conf \
|
||||
--gameid minetestforfun_hg \
|
||||
--port 30042 \
|
||||
# --logfile $DEBUG
|
||||
|
||||
sleep 25
|
||||
done &>> $MOREDEBUG
|
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEBUG='/home/quentinbd/script/debug-mff-skyblock.txt'
|
||||
MOREDEBUG='/home/quentinbd/script/moredebug-mff-skyblock.txt'
|
||||
|
||||
cd /home/quentinbd/mff-skyblock
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 5
|
||||
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
|
||||
echo "0" >/tmp/players_c.txt
|
||||
|
||||
/home/quentinbd/mff-skyblock/bin/minetestserver \
|
||||
--world /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/ \
|
||||
--config /home/quentinbd/mff-skyblock/minetest.conf \
|
||||
--gameid minetestforfun_skyblock \
|
||||
--port 30054 \
|
||||
# --logfile $DEBUG
|
||||
|
||||
sleep 25
|
||||
done &>> $MOREDEBUG
|
@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEBUG='/home/quentinbd/script/debug-mff.txt'
|
||||
MOREDEBUG='/home/quentinbd/script/moredebug-mff.txt'
|
||||
|
||||
cd /home/quentinbd/mff
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 5
|
||||
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||
echo "----------------------" >>$MOREDEBUG
|
||||
|
||||
echo "0" >/tmp/players_c.txt
|
||||
|
||||
/home/quentinbd/mff/bin/minetestserver \
|
||||
--world /home/quentinbd/mff/worlds/minetestforfun/ \
|
||||
--config /home/quentinbd/mff/minetest.conf \
|
||||
--gameid minetestforfun_game \
|
||||
--port 30001 \
|
||||
# --logfile $DEBUG
|
||||
|
||||
sleep 25
|
||||
done &>> $MOREDEBUG
|
||||
|
@ -1,50 +0,0 @@
|
||||
# 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/
|
||||
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/
|
||||
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/
|
||||
echo "Nouveaux /mods et /games correctement déplacés"
|
||||
|
||||
# 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/
|
||||
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/
|
||||
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/
|
||||
echo "Nouveau minetest.conf, game.conf, world.mt, random_messages, et le forbidden_names correctement déplacé"
|
||||
|
||||
# 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"
|
@ -1,44 +0,0 @@
|
||||
# passer sur branche master ou stable github
|
||||
cd /home/quentinbd/mff-creative/
|
||||
|
||||
# Suppression des anciens fichiers
|
||||
rm -Rv /home/quentinbd/upgrade-mff-creative/olds
|
||||
rm -Rv /home/quentinbd/upgrade-mff-creative/mff-creative.tar.gz
|
||||
|
||||
# Sauvegarde des fichiers critiques
|
||||
cp -Rv /home/quentinbd/mff-creative/games/minetestforfun_creative/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp -Rv /home/quentinbd/mff-creative/mods/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp -Rv /home/quentinbd/mff-creative/worlds/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp /home/quentinbd/mff-creative/minetest.conf /home/quentinbd/upgrade-mff-creative/olds/
|
||||
|
||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||
cd /home/quentinbd/upgrade-mff-creative/
|
||||
tar -cf mff-creative.tar.gz /home/quentinbd/mff-creative/
|
||||
|
||||
# Suppression de minetest
|
||||
rm -Rv /home/quentinbd/mff-creative/
|
||||
|
||||
# Réinstallaton de minetest
|
||||
cd /home/quentinbd/
|
||||
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||
unzip /home/quentinbd/stable-0.4
|
||||
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-creative/
|
||||
rm -v /home/quentinbd/stable-0.4
|
||||
# FIN - Utilisation de la version 0.4 stable
|
||||
|
||||
# Compilation
|
||||
cd /home/quentinbd/mff-creative/
|
||||
# build SQLITE3
|
||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||
make -j$(grep -c processor /proc/cpuinfo)
|
||||
|
||||
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||
cp -Rv /home/quentinbd/upgrade-mff-creative/olds/minetestforfun_creative/ /home/quentinbd/mff-creative/games/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-creative/olds/mods/ /home/quentinbd/mff-creative/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-creative/olds/worlds/ /home/quentinbd/mff-creative/
|
||||
cp /home/quentinbd/upgrade-mff-creative/olds/minetest.conf /home/quentinbd/mff-creative/
|
||||
|
||||
# Donne les droits à quentinbd
|
||||
chmod -R 755 /home/quentinbd/mff-creative/
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-creative/
|
@ -1,51 +0,0 @@
|
||||
# on récupère la dernière version du jeu
|
||||
cd /home/quentinbd/
|
||||
git clone https://github.com/MinetestForFun/server-minetestforfun-hungry_games.git
|
||||
echo "Clone de server-minetestforfun-hungry_games réussit."
|
||||
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/
|
||||
rm -R /home/quentinbd/mff-hg/games/
|
||||
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/
|
||||
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"
|
||||
|
||||
# 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
|
||||
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
|
||||
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/
|
||||
echo "Nouveau minetest.conf, world.mt, random_messages, top_config.txt, et le forbidden_names correctement déplacé"
|
||||
|
||||
# Suppression du dossier cloné
|
||||
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"
|
@ -1,44 +0,0 @@
|
||||
# passer sur branche master ou stable github
|
||||
cd /home/quentinbd/mff-hg/
|
||||
|
||||
# Suppression des anciens fichiers
|
||||
rm -Rv /home/quentinbd/upgrade-mff-hg/olds
|
||||
rm -Rv /home/quentinbd/upgrade-mff-hg/mff-hg.tar.gz
|
||||
|
||||
# Sauvegarde des fichiers critiques
|
||||
cp -Rv /home/quentinbd/mff-hg/games/minetestforfun_hg/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||
cp -Rv /home/quentinbd/mff-hg/mods/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||
cp -Rv /home/quentinbd/mff-hg/worlds/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||
cp /home/quentinbd/mff-hg/minetest.conf /home/quentinbd/upgrade-mff-hg/olds/
|
||||
|
||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||
cd /home/quentinbd/upgrade-mff-hg/
|
||||
tar -cf mff-hg.tar.gz /home/quentinbd/mff-hg/
|
||||
|
||||
# Suppression de minetest
|
||||
rm -Rv /home/quentinbd/mff-hg/
|
||||
|
||||
# Réinstallaton de minetest
|
||||
cd /home/quentinbd/
|
||||
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||
unzip /home/quentinbd/stable-0.4
|
||||
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-hg/
|
||||
rm -v /home/quentinbd/stable-0.4
|
||||
# FIN - Utilisation de la version 0.4 stable
|
||||
|
||||
# Compilation
|
||||
cd /home/quentinbd/mff-hg/
|
||||
# build SQLITE3
|
||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||
make -j$(grep -c processor /proc/cpuinfo)
|
||||
|
||||
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/minetestforfun_game/ /home/quentinbd/mff-hg/games/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/mods/ /home/quentinbd/mff-hg/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/worlds/ /home/quentinbd/mff-hg/
|
||||
cp /home/quentinbd/upgrade-mff-hg/olds/minetest.conf /home/quentinbd/mff-hg/
|
||||
|
||||
# Donne les droits à quentinbd
|
||||
chmod -R 755 /home/quentinbd/mff-hg/
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-hg/
|
@ -1,49 +0,0 @@
|
||||
# on récupère la dernière version du jeu
|
||||
cd /home/quentinbd/
|
||||
git clone https://github.com/MinetestForFun/server-minetestforfun-skyblock.git
|
||||
echo "Clone de server-minetestforfun-skyblock réussit."
|
||||
cd /home/quentinbd/server-minetestforfun-skyblock/
|
||||
git submodule update --init --recursive
|
||||
|
||||
# On sauvegarde les anciens ../games et ../mods
|
||||
rm -R /home/quentinbd/upgrade-mff-skyblock/olds-part/games/
|
||||
rm -R /home/quentinbd/upgrade-mff-skyblock/olds-part/mods/
|
||||
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||
|
||||
cp -R /home/quentinbd/mff-skyblock/mods/ /home/quentinbd/upgrade-mff-skyblock/olds-part/
|
||||
cp -R /home/quentinbd/mff-skyblock/games/ /home/quentinbd/upgrade-mff-skyblock/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-skyblock/mods/
|
||||
rm -R /home/quentinbd/mff-skyblock/games/
|
||||
mkdir -p /home/quentinbd/mff-skyblock/games/
|
||||
mkdir -p /home/quentinbd/server-minetestforfun-skyblock/games
|
||||
mkdir -p /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/
|
||||
mkdir -p /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/mods/
|
||||
cp -R /home/quentinbd/server-minetestforfun-skyblock/mods/ /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/
|
||||
echo "Nouveaux /mods et /games correctement déplacés"
|
||||
|
||||
# On MAJ le minetest.conf, world.mt, le random_messages et le forbidden_names
|
||||
mkdir -p /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/
|
||||
rm /home/quentinbd/mff-skyblock/minetest.conf
|
||||
rm /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/world.mt
|
||||
rm /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/random_messages
|
||||
rm /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/forbidden_names.txt
|
||||
# On les remet
|
||||
cp /home/quentinbd/server-minetestforfun-skyblock/minetest.conf /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/
|
||||
cp /home/quentinbd/server-minetestforfun-skyblock/minetest.conf /home/quentinbd/mff-skyblock/
|
||||
cp /home/quentinbd/server-minetestforfun-skyblock/game.conf /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/
|
||||
#cp /home/quentinbd/server-minetestforfun-skyblock/worlds/minetestforfun-skyblock/world.mt /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/
|
||||
cp /home/quentinbd/server-minetestforfun-skyblock/worlds/minetestforfun-skyblock/random_messages /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/
|
||||
cp /home/quentinbd/server-minetestforfun-skyblock/worlds/minetestforfun-skyblock/forbidden_names.txt /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/
|
||||
echo "Nouveau minetest.conf, world.mt, le random_messages et le forbidden_names correctement déplacé"
|
||||
|
||||
# Suppression du dossier cloné
|
||||
rm -Rf /home/quentinbd/server-minetestforfun-skyblock/
|
||||
echo "Bravo ! mff-skyblock/mods et mff-skyblock/games maintenant à jour"
|
||||
|
||||
# On ré-attribut les droits à quentinbd et en 755
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-skyblock/
|
||||
chmod -R 755 /home/quentinbd/mff-skyblock/
|
||||
echo "ré-attribution des droits à quentinbd:quentinbd"
|
@ -1,45 +0,0 @@
|
||||
# passer sur branche master ou stable github
|
||||
cd /home/quentinbd/mff-skyblock/
|
||||
|
||||
# Suppression des anciens fichiers
|
||||
rm -Rv /home/quentinbd/upgrade-mff-skyblock/olds
|
||||
rm -Rv /home/quentinbd/upgrade-mff-skyblock/mff-skyblock.tar.gz
|
||||
|
||||
# Sauvegarde des fichiers critiques
|
||||
mkdir /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/
|
||||
cp -Rv /home/quentinbd/mff-skyblock/games/minetestforfun_skyblock/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||
cp -Rv /home/quentinbd/mff-skyblock/mods/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||
cp -Rv /home/quentinbd/mff-skyblock/worlds/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||
cp /home/quentinbd/mff-skyblock/minetest.conf /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||
|
||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||
cd /home/quentinbd/upgrade-mff-skyblock/
|
||||
tar -cf mff-skyblock.tar.gz /home/quentinbd/mff-skyblock/
|
||||
|
||||
# Suppression de minetest
|
||||
rm -Rv /home/quentinbd/mff-skyblock/
|
||||
|
||||
# Réinstallaton de minetest
|
||||
cd /home/quentinbd/
|
||||
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||
unzip /home/quentinbd/stable-0.4
|
||||
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-skyblock/
|
||||
rm -v /home/quentinbd/stable-0.4
|
||||
# FIN - Utilisation de la version 0.4 stable
|
||||
|
||||
# Compilation
|
||||
cd /home/quentinbd/mff-skyblock/
|
||||
# build SQLITE3
|
||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||
make -j$(grep -c processor /proc/cpuinfo)
|
||||
|
||||
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/minetestforfun_skyblock/ /home/quentinbd/mff-skyblock/games/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/mods/ /home/quentinbd/mff-skyblock/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/worlds/ /home/quentinbd/mff-skyblock/
|
||||
cp /home/quentinbd/upgrade-mff-skyblock/olds/minetest.conf /home/quentinbd/mff-skyblock/
|
||||
|
||||
# Donne les droits à quentinbd
|
||||
chmod -R 755 /home/quentinbd/mff-skyblock/
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-skyblock/
|
@ -1,53 +0,0 @@
|
||||
# On récupère la dernière version du jeu
|
||||
cd /home/quentinbd/
|
||||
git clone https://github.com/MinetestForFun/server-minetestforfun.git
|
||||
echo "Clone de server-minetestforfun réussit."
|
||||
cd /home/quentinbd/server-minetestforfun/
|
||||
git submodule update --init --recursive
|
||||
|
||||
# On sauvegarde les anciens ../games et ../mods
|
||||
rm -R /home/quentinbd/upgrade-mff/olds-part/games/
|
||||
rm -R /home/quentinbd/upgrade-mff/olds-part/mods/
|
||||
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||
|
||||
cp -R /home/quentinbd/mff/mods/ /home/quentinbd/upgrade-mff/olds-part/
|
||||
cp -R /home/quentinbd/mff/games/ /home/quentinbd/upgrade-mff/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/games/
|
||||
rm -R /home/quentinbd/mff/mods/
|
||||
mkdir -p /home/quentinbd/mff/games/
|
||||
cp -R /home/quentinbd/server-minetestforfun/minetestforfun_game/ /home/quentinbd/mff/games/
|
||||
cp -R /home/quentinbd/server-minetestforfun/mods/ /home/quentinbd/mff/
|
||||
echo "Nouveaux /mods et /games correctement déplacés"
|
||||
|
||||
# On MAJ le minetest.conf, world.mt, random_messages, forbidden_names, et le news.txt
|
||||
mkdir -p /home/quentinbd/mff/worlds/minetestforfun/
|
||||
rm /home/quentinbd/mff/minetest.conf
|
||||
rm /home/quentinbd/mff/worlds/minetestforfun/world.mt
|
||||
rm /home/quentinbd/mff/worlds/minetestforfun/random_messages
|
||||
rm /home/quentinbd/mff/worlds/minetestforfun/news.txt
|
||||
rm /home/quentinbd/mff/worlds/minetestforfun/forbidden_names.txt
|
||||
# On les remet
|
||||
cp /home/quentinbd/server-minetestforfun/minetest.conf /home/quentinbd/mff/
|
||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/world.mt /home/quentinbd/mff/worlds/minetestforfun/
|
||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/random_messages /home/quentinbd/mff/worlds/minetestforfun/
|
||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/news.txt /home/quentinbd/mff/worlds/minetestforfun/
|
||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/forbidden_names.txt /home/quentinbd/mff/worlds/minetestforfun/
|
||||
echo "Nouvelles news.txt, world.mt et random_messages correctement déplacé"
|
||||
|
||||
# TEMPORAIRE - ré-ajout de l'ancien mod irc
|
||||
#rm -R /home/quentinbd/mff/mods/irc/
|
||||
#cp -R /home/quentinbd/server-minetestforfun/other_things/irc-old-save/ /home/quentinbd/mff/mods/
|
||||
#mv /home/quentinbd/mff/mods/irc-old-save/ /home/quentinbd/mff/mods/irc/
|
||||
#echo "TEMPORAIRE - ré-ajout de l'ancien mod irc"
|
||||
|
||||
# Suppression du dossier cloné
|
||||
rm -Rf /home/quentinbd/server-minetestforfun/
|
||||
echo "Bravo ! mff/mods et mff/games maintenant à jour"
|
||||
|
||||
# On ré-attribut les droits à quentinbd et en 755
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff/
|
||||
chmod -R 755 /home/quentinbd/mff/
|
||||
echo "ré-attribution des droits à quentinbd:quentinbd"
|
@ -1,44 +0,0 @@
|
||||
# passer sur branche master ou stable github
|
||||
cd /home/quentinbd/mff/
|
||||
|
||||
# Suppression des anciens fichiers
|
||||
rm -Rv /home/quentinbd/upgrade-mff/olds
|
||||
rm -Rv /home/quentinbd/upgrade-mff/mff.tar.gz
|
||||
|
||||
# Sauvegarde des fichiers critiques
|
||||
cp -Rv /home/quentinbd/mff/games/minetestforfun_game/ /home/quentinbd/upgrade-mff/olds/
|
||||
cp -Rv /home/quentinbd/mff/mods/ /home/quentinbd/upgrade-mff/olds/
|
||||
cp -Rv /home/quentinbd/mff/worlds/ /home/quentinbd/upgrade-mff/olds/
|
||||
cp /home/quentinbd/mff/minetest.conf /home/quentinbd/upgrade-mff/olds/
|
||||
|
||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||
cd /home/quentinbd/upgrade-mff/
|
||||
tar -cf mff.tar.gz /home/quentinbd/mff/
|
||||
|
||||
# Suppression de minetest
|
||||
rm -Rv /home/quentinbd/mff/
|
||||
|
||||
# Réinstallaton de minetest
|
||||
cd /home/quentinbd/
|
||||
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||
unzip /home/quentinbd/stable-0.4
|
||||
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff/
|
||||
rm -v /home/quentinbd/stable-0.4
|
||||
# FIN - Utilisation de la version 0.4 stable
|
||||
|
||||
# Compilation
|
||||
cd /home/quentinbd/mff/
|
||||
# Build REDIS + IRC
|
||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_CURL=1
|
||||
make -j$(grep -c processor /proc/cpuinfo)
|
||||
|
||||
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||
cp -Rv /home/quentinbd/upgrade-mff/olds/minetestforfun_game/ /home/quentinbd/mff/games/
|
||||
cp -Rv /home/quentinbd/upgrade-mff/olds/mods/ /home/quentinbd/mff/
|
||||
cp -Rv /home/quentinbd/upgrade-mff/olds/worlds/ /home/quentinbd/mff/
|
||||
cp /home/quentinbd/upgrade-mff/olds/minetest.conf /home/quentinbd/mff/
|
||||
|
||||
# Donne les droits à quentinbd
|
||||
chmod -R 755 /home/quentinbd/mff/
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/
|
Reference in New Issue
Block a user