Nettoyage du script et quelques corrections

This commit is contained in:
2019-12-08 01:12:31 +01:00
parent 96f3b40afc
commit 60eafc9af1
2 changed files with 61 additions and 147 deletions

View File

@@ -38,7 +38,7 @@ usage() {
echo -e "\t-b --branch <branch>\tBranche concerné"
echo -e "\t-f --world-file <arg>\tFichier(s) a mettre à jour :"
echo -e "\t<arg> doit être une des valeur suivante :"
echo -e "\tall\t\tTous les fichiers seront mis à jours"
echo -e "\tall\t\tToutes les mise à jour suivantes seront executés sauf 'mtconf'"
echo -e "\tnews\t\tLes news du serveur"
echo -e "\ttechnic\t\tLes paramètres de technic"
echo -e "\tfbn\t\tLes paramètres de forbidden_names"
@@ -51,10 +51,10 @@ usage() {
echo "Exemples:"
echo -e "\tMise à jour des mods :"
echo -e "\t$ ./upgrade.sh -m"
echo -e "\tMise à jour des fichiers world :"
echo -e "\t$ ./upgrade.sh -w nalc-stable -b stable"
echo -e "\tMise à jour des mods et des news :"
echo -e "\t$ ./upgrade.sh -m -w nalc-1.1 -b 1.1 -f news"
echo -e "\tMise à jour du fichier minetest.conf :"
echo -e "\t$ ./upgrade.sh -w nalc-stable -b stable -f mtconf"
echo -e "\tMise à jour complète (mods et fichiers world, sauf minetest.conf) :"
echo -e "\t$ ./upgrade.sh -m -w nalc-1.1 -b 1.1"
}
regen_worldmt() {
@@ -88,12 +88,12 @@ regen_worldmt() {
local mods_minetest=$serverpath/minetest/mods
local mods_custom=$serverpath/custom/mods
rm $mods_minetest/*
rm -f $mods_minetest/*
if [[ -d $mods_custom ]]; then
ls $mods_custom | while read -r mod; do
if [[ -d $mods_cutom/$mod ]]; then
rm $mods_path/$mod
rm -f $mods_path/$mod
ln -s $mods_custom/$mod $mods_path/$mod
fi
done
@@ -170,7 +170,7 @@ update_world() {
fi
if [[ $WORLD_FILE == "all" ]]; then
WORLD_FILE="news technic fbn fbnp bitchange christmas randommsg worldmt mtconf"
WORLD_FILE="news technic fbn fbnp bitchange christmas randommsg worldmt"
fi
for w_file in $WORLD_FILE; do
@@ -202,7 +202,7 @@ update_world() {
worldmt)
do_copy=0
regen_worldmt;;
mtconf)
mtconf) # Exception ici car n'est pas un fichier world. Doit être appelé seul.
file_dest=$serverpath/minetest/minetest.conf
file=$serverpath/minetest-$BRANCH.conf;;
*)