Fix install and upgrade scripts

This commit is contained in:
bri cassa 2021-03-05 07:38:51 +01:00
parent d5c6a01a0d
commit 1b3318ec2f
3 changed files with 16 additions and 11 deletions

View File

@ -163,7 +163,7 @@ install_minetest_game() {
elif [[ $ver == "1.2" ]]; then elif [[ $ver == "1.2" ]]; then
branch="-b nalc-1.2" branch="-b nalc-1.2"
elif [[ $ver == "1.3" || $ver == "stable" ]]; then elif [[ $ver == "1.3" || $ver == "stable" ]]; then
branch="-b nalc-1.3" branch="-b master"
elif [[ $ver == "dev" ]]; then elif [[ $ver == "dev" ]]; then
branch="-b nalc-dev" branch="-b nalc-dev"
fi fi

View File

@ -318,3 +318,8 @@ toolranks_levels = 80
toolranks_level_digs = 5000 toolranks_level_digs = 5000
toolranks_speed_multiplier = 4.0 toolranks_speed_multiplier = 4.0
toolranks_use_multiplier = 4.0 toolranks_use_multiplier = 4.0
# tsm_mines
mines_deep_min = -64
mines_deep_max = -13800 # default -380
mines_spawnfactor = 1.5

View File

@ -116,7 +116,15 @@ regen_worldmt() {
if [[ -d $mods_path/$mod ]]; then if [[ -d $mods_path/$mod ]]; then
ln -s $mods_path/$mod $mods_minetest/$mod ln -s $mods_path/$mod $mods_minetest/$mod
if [[ -e $mods_path/$mod/modpack.txt || -e $mods_path/$mod/modpack.conf ]]; then if [[ -e $mods_path/$mod/init.lua ]]; then
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" >> /tmp/world.mt
else
ls $mods_path/$mod | while read -r submod; do ls $mods_path/$mod | while read -r submod; do
if [[ -d $mods_path/$mod/$submod ]]; then if [[ -d $mods_path/$mod/$submod ]]; then
local mod_enable="true" local mod_enable="true"
@ -128,14 +136,6 @@ regen_worldmt() {
echo "load_mod_$submod = $mod_enable" >> /tmp/world.mt echo "load_mod_$submod = $mod_enable" >> /tmp/world.mt
fi fi
done 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" >> /tmp/world.mt
fi fi
fi fi
done done