Browse Source

only erase official mods during clean

master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
4eae30b0ba
  1. 37
      webapp/install-mts.sh

37
webapp/install-mts.sh

@ -30,6 +30,8 @@ do
enable_client=true enable_client=true
elif [ "@$var" = "@--clean" ]; then elif [ "@$var" = "@--clean" ]; then
enable_clean=true enable_clean=true
elif [ "@$var" = "@--noclean" ]; then
enable_clean=false
else else
customDie "Invalid argument: $var" customDie "Invalid argument: $var"
fi fi
@ -136,6 +138,7 @@ dest_official_game="$dest_programs/minetest/games/Bucket_Game"
dest_enliven="$dest_programs/minetest/games/ENLIVEN" dest_enliven="$dest_programs/minetest/games/ENLIVEN"
skins_dst="$dest_enliven/mods/codercore/coderskins/textures" skins_dst="$dest_enliven/mods/codercore/coderskins/textures"
skins_bak="$HOME/Backup/ENLIVEN/mods/codercore/coderskins/textures" skins_bak="$HOME/Backup/ENLIVEN/mods/codercore/coderskins/textures"
official_game_mod_list="coderbuild codercore coderedit coderfood codermobs decorpack mtmachines"
if [ "@$enable_clean" = "@true" ]; then if [ "@$enable_clean" = "@true" ]; then
echo "* cleaning destination..." echo "* cleaning destination..."
if [ -d "$dest_official_game" ]; then if [ -d "$dest_official_game" ]; then
@ -150,8 +153,11 @@ if [ "@$enable_clean" = "@true" ]; then
fi fi
rsync -rt "$skins_dst/" "$skins_bak" rsync -rt "$skins_dst/" "$skins_bak"
fi fi
echo " - erasing '$dest_enliven'..." for var in $official_game_mod_list
rm -Rf "$dest_enliven" do
echo " - erasing '$dest_enliven/$var'..."
rm -Rf "$dest_enliven/$var"
done
fi fi
fi fi
if [ ! -z "$link_target" ]; then if [ ! -z "$link_target" ]; then
@ -181,27 +187,12 @@ if [ ! -d "$dest_programs/minetest/games/ENLIVEN" ]; then
cp -R "$flag_dir" "$dest_programs/minetest/games/ENLIVEN" cp -R "$flag_dir" "$dest_programs/minetest/games/ENLIVEN"
echo "name = ENLIVEN" > "$dest_programs/minetest/games/ENLIVEN/game.conf" echo "name = ENLIVEN" > "$dest_programs/minetest/games/ENLIVEN/game.conf"
else else
mod_name=coderbuild
echo " - updating $mod_name..." for mod_name in $official_game_mod_list
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods" do
mod_name=codercore echo " - updating $mod_name..."
echo " - updating $mod_name..." rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods" done
mod_name=coderedit
echo " - updating $mod_name..."
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
mod_name=coderfood
echo " - updating $mod_name..."
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
mod_name=codermobs
echo " - updating $mod_name..."
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
mod_name=decorpack
echo " - updating $mod_name..."
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
mod_name=mtmachines
echo " - updating $mod_name..."
rsync -rt --delete "$flag_dir/mods/$mod_name" "$dest_programs/minetest/games/ENLIVEN/mods"
# cp -f "$flag_dir/mods/LICENSE" "$dest_programs/minetest/games/ENLIVEN/mods/LICENSE" # cp -f "$flag_dir/mods/LICENSE" "$dest_programs/minetest/games/ENLIVEN/mods/LICENSE"
if [ -d "$skins_bak" ]; then if [ -d "$skins_bak" ]; then
echo " - restoring skins from '$skins_bak'..." echo " - restoring skins from '$skins_bak'..."

Loading…
Cancel
Save