Nettoyage du script d'installation
This commit is contained in:
parent
43351572c2
commit
0b6b62daef
59
install.sh
59
install.sh
@ -29,7 +29,7 @@ usage() {
|
|||||||
echo -e "\t-i --irrlicht\tChemin personnalisé des sources irrlicht."
|
echo -e "\t-i --irrlicht\tChemin personnalisé des sources irrlicht."
|
||||||
echo -e "\t-p --postgresql\tSi vous voulez que le serveur soit configuré avec postgresql"
|
echo -e "\t-p --postgresql\tSi vous voulez que le serveur soit configuré avec postgresql"
|
||||||
echo "Arguments :"
|
echo "Arguments :"
|
||||||
echo -e "\t5 : Installation du serveur avec minetest-5.x. Suivez les instructions... (Non stable !)"
|
echo -e "\t5.0 : Installation du serveur avec minetest-5.x. Suivez les instructions... (Non stable !)"
|
||||||
echo -e "\t0.4 : Installation du serveur avec minetest-0.4.x. Suivez les instructions... (Stable)"
|
echo -e "\t0.4 : Installation du serveur avec minetest-0.4.x. Suivez les instructions... (Stable)"
|
||||||
echo -e "\tmaster : Installation du serveur avec la branche master de minetest. Suivez les instructions... (Non Stable !)"
|
echo -e "\tmaster : Installation du serveur avec la branche master de minetest. Suivez les instructions... (Non Stable !)"
|
||||||
exit 0
|
exit 0
|
||||||
@ -140,7 +140,7 @@ install_minetest() {
|
|||||||
local branch="-b master"
|
local branch="-b master"
|
||||||
if [[ $ver == "0.4" ]]; then
|
if [[ $ver == "0.4" ]]; then
|
||||||
branch="-b stable-0.4"
|
branch="-b stable-0.4"
|
||||||
elif [[ $ver == "5" ]]; then
|
elif [[ $ver == "5.0" ]]; then
|
||||||
branch="-b stable-5.0"
|
branch="-b stable-5.0"
|
||||||
fi
|
fi
|
||||||
git clone --depth 1 $branch https://github.com/minetest/minetest.git
|
git clone --depth 1 $branch https://github.com/minetest/minetest.git
|
||||||
@ -187,7 +187,7 @@ install_minetest_game() {
|
|||||||
local branch="-b master"
|
local branch="-b master"
|
||||||
if [[ $ver == "0.4" ]]; then
|
if [[ $ver == "0.4" ]]; then
|
||||||
branch="-b nalc"
|
branch="-b nalc"
|
||||||
elif [[ $ver == "5" ]]; then
|
elif [[ $ver == "5.0" ]]; then
|
||||||
branch="-b stable-5.0"
|
branch="-b stable-5.0"
|
||||||
fi
|
fi
|
||||||
git clone --depth 1 $branch $URL/nalc_game.git
|
git clone --depth 1 $branch $URL/nalc_game.git
|
||||||
@ -243,54 +243,6 @@ install_world() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_mods() {
|
install_mods() {
|
||||||
# if [[ $ver == "0.4" ]]; then
|
|
||||||
# local i=0
|
|
||||||
# local md[1]="" # Mods to disable
|
|
||||||
# for mod in 3d_armor_ip 3d_armor_sfinv mysql_auth watershed mobs_old magicmithril blackmithril hardenedleather reinforcedleather obsidian eventobjects player_inactive random_messages irc irc_commands profilerdumper profnsched; do
|
|
||||||
# i=$(( $i+1 ))
|
|
||||||
# md[$i]=$mod
|
|
||||||
# done
|
|
||||||
#
|
|
||||||
# if [[ -d minetest/mods ]]; then
|
|
||||||
# rm -rf minetest/mods
|
|
||||||
# ln -s $(pwd)/server-0.4/mods minetest/mods
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# if [[ -a world.mt && -z $pg_dbname ]]; then
|
|
||||||
# rm world.mt
|
|
||||||
# cp worldmt.conf world.mt
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# ls server-0.4/mods | while read -r mod; do
|
|
||||||
# if [[ -a server-0.4/mods/$mod/modpack.txt ]]; then
|
|
||||||
# ls server-0.4/mods/$mod | while read -r submod; do
|
|
||||||
# if [[ -d server-0.4/mods/$mod/$submod ]]; then
|
|
||||||
# local mod_enable="true"
|
|
||||||
# for (( modn=1; modn<=$i; modn++ )); do
|
|
||||||
# if [[ ${md[$modn]} == $submod ]]; then
|
|
||||||
# mod_enable="false"
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
# echo "load_mod_$submod = $mod_enable" >> world.mt
|
|
||||||
# if [[ $mod_enable == "true" && -d custom/textures/$submod ]]; then
|
|
||||||
# cp custom/textures/$submod/* server-0.4/mods/$mod/$submod/textures/
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
# else
|
|
||||||
# local mod_enable="true"
|
|
||||||
# for (( modn=1; modn<=$i; modn++ )); do
|
|
||||||
# if [[ ${md[$modn]} == $mod ]]; then
|
|
||||||
# mod_enable="false"
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
# echo "load_mod_$mod = $mod_enable" >> world.mt
|
|
||||||
# if [[ $mod_enable == "true" && -d custom/textures/$mod ]]; then
|
|
||||||
# cp custom/textures/$submod/* server-0.4/mods/$mod/textures/
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
|
|
||||||
if [[ -d nalc-server-mods ]]; then
|
if [[ -d nalc-server-mods ]]; then
|
||||||
echo "Le dossier de mods est déjà présent. Que souhaitez-vous faire ?"
|
echo "Le dossier de mods est déjà présent. Que souhaitez-vous faire ?"
|
||||||
read -p "Choisissez parmi la liste, ([1]update, [2]clean, [3]cancel, [4]Ne rien faire) : " continue
|
read -p "Choisissez parmi la liste, ([1]update, [2]clean, [3]cancel, [4]Ne rien faire) : " continue
|
||||||
@ -415,9 +367,6 @@ init() {
|
|||||||
|
|
||||||
read -p "L'installation va démarrer. Continuer ? (y or n) : " continue
|
read -p "L'installation va démarrer. Continuer ? (y or n) : " continue
|
||||||
if [[ $continue == "y" ]]; then
|
if [[ $continue == "y" ]]; then
|
||||||
# if [[ $ver == "0.4" ]]; then
|
|
||||||
# install_0.4
|
|
||||||
# fi
|
|
||||||
install_minetest
|
install_minetest
|
||||||
install_minetest_game
|
install_minetest_game
|
||||||
install_mods
|
install_mods
|
||||||
@ -431,7 +380,7 @@ init() {
|
|||||||
|
|
||||||
action() {
|
action() {
|
||||||
local arg=$(strip $1)
|
local arg=$(strip $1)
|
||||||
if [[ $arg == "5" || $arg == "0.4" || $arg == "master" ]]; then
|
if [[ $arg == "5.0" || $arg == "0.4" || $arg == "master" ]]; then
|
||||||
init $arg
|
init $arg
|
||||||
else
|
else
|
||||||
error
|
error
|
||||||
|
Loading…
Reference in New Issue
Block a user