Browse Source

rename variables

master
poikilos 5 years ago
parent
commit
fb47ed2d3a
  1. 8
      build-minetest-here.sh
  2. 24
      minetestenv.rc
  3. 8
      utilities/extra/install-ENLIVEN-minetest_game.sh

8
build-minetest-here.sh

@ -3,11 +3,11 @@ customExit(){
echo "$1"
exit 1
}
mybuild="minetest-built"
if [ ! -d $mybuild ]; then
#mybuild="minetest-built"
#if [ ! -d $mybuild ]; then
# mkdir $mybuild
echo
fi
# echo
#fi
# cd $mybuild || customExit "$0: cd build failed in '`pwd`'."
if [ -f bin/minetest ]; then
make clean || customExit "$0: make clean failed in '`pwd`'."

24
minetestenv.rc

@ -31,19 +31,19 @@ customExit() {
}
CONFIG_PATH="$HOME/.config/EnlivenMinetest"
CACHE_PATH="$HOME/.cache/EnlivenMinetest"
EM_CACHE_PATH="$HOME/.cache/EnlivenMinetest"
if [ ! -d "$CONFIG_PATH" ]; then
mkdir -p "$CONFIG_PATH"
fi
if [ ! -d "$CACHE_PATH" ]; then
mkdir -p "$CACHE_PATH"
if [ ! -d "$EM_CACHE_PATH" ]; then
mkdir -p "$EM_CACHE_PATH"
fi
RELEASES_PATH="$CACHE_PATH/releases"
RELEASES_PATH="$EM_CACHE_PATH/releases"
if [ -d "$CONFIG_PATH/cache/releases" ]; then
# upgrade/remove cache from older versions of this script
if [ ! -d "$CACHE_PATH/releases" ]; then
mv "$CONFIG_PATH/cache/releases" "$CACHE_PATH/"
if [ ! -d "$EM_CACHE_PATH/releases" ]; then
mv "$CONFIG_PATH/cache/releases" "$EM_CACHE_PATH/"
echo "upgraded cache from older version of this script (moved to $RELEASES_PATH)"
else
rm -Rf "$CONFIG_PATH/cache/releases"
@ -54,10 +54,10 @@ if [ ! -d "$RELEASES_PATH" ]; then
mkdir -p "$RELEASES_PATH"
fi
GIT_REPOS_PATH="$CACHE_PATH/git"
GIT_REPOS_PATH="$EM_CACHE_PATH/git"
if [ -d "$CONFIG_PATH/cache/git" ]; then
if [ ! -d "$CACHE_PATH/git" ]; then
mv "$CONFIG_PATH/cache/git" "$CACHE_PATH/"
if [ ! -d "$EM_CACHE_PATH/git" ]; then
mv "$CONFIG_PATH/cache/git" "$EM_CACHE_PATH/"
echo "upgraded cache from older version of this script (moved to $GIT_REPOS_PATH)"
else
rm -Rf "$CONFIG_PATH/cache/git"
@ -68,11 +68,11 @@ fi
if [ ! -d "$GIT_REPOS_PATH" ]; then
mkdir -p "$GIT_REPOS_PATH"
fi
GIT_BRANCHES_PATH="$CACHE_PATH/git-branches"
GIT_BRANCHES_PATH="$EM_CACHE_PATH/git-branches"
if [ -d "$CONFIG_PATH/cache/git-branches" ]; then
# upgrade/remove cache from older versions of this script
if [ ! -d "$CACHE_PATH/git-branches" ]; then
mv "$CONFIG_PATH/cache/git-branches" "$CACHE_PATH/"
if [ ! -d "$EM_CACHE_PATH/git-branches" ]; then
mv "$CONFIG_PATH/cache/git-branches" "$EM_CACHE_PATH/"
echo "upgraded cache from older version of this script (moved to $GIT_BRANCHES_PATH)"
else
rm -Rf "$CONFIG_PATH/cache/git-branches"

8
utilities/extra/install-ENLIVEN-minetest_game.sh

@ -1119,11 +1119,11 @@ if [ -f "`command -v blender`" ]; then
fi
echo "Hopefully <https://github.com/minetest-mods/technic/issues/448> is fixed by the time you try this, otherwise you'll have to patch /usr/local/share/minetest/games/ENLIVEN/mods/technic/technic/machines/register/extractor_recipes.lua manually using workaround at <https://github.com/minetest/minetest/issues/6513>."
echo
ls $MT_MYGAME_MODS_PATH > "$CONFIG_PATH/actual_mod_list.txt"
sort "$MOD_LIST" > "$CONFIG_PATH/mod_list_sorted.txt"
if [ ! -z "`diff "$CONFIG_PATH/mod_list_sorted.txt" "$CONFIG_PATH/actual_mod_list.txt"`" ]; then
ls $MT_MYGAME_MODS_PATH > "$EM_CONFIG_PATH/actual_mod_list.txt"
sort "$MOD_LIST" > "$EM_CONFIG_PATH/mod_list_sorted.txt"
if [ ! -z "`diff "$EM_CONFIG_PATH/mod_list_sorted.txt" "$EM_CONFIG_PATH/actual_mod_list.txt"`" ]; then
echo "Any failures to install will be listed below."
diff "$CONFIG_PATH/mod_list_sorted.txt" "$CONFIG_PATH/actual_mod_list.txt"
diff "$EM_CONFIG_PATH/mod_list_sorted.txt" "$EM_CONFIG_PATH/actual_mod_list.txt"
fi
if [ ! -d "$MT_MYGAME_MODS_PATH/dungeon_loot" ]; then
echo "No mod loot for dungeon_loot (nor forks of worldgen mods which should use it) are in ENLIVEN, so dungeon_loot from $mtgame_name is removed by this script for now (treasurer and relevant trm_* mods are used instead)."

Loading…
Cancel
Save