From fb47ed2d3abcc8b3c0c04fda18017809f8f478b4 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Thu, 7 May 2020 14:10:22 -0400 Subject: [PATCH] rename variables --- build-minetest-here.sh | 8 +++---- minetestenv.rc | 24 +++++++++---------- .../extra/install-ENLIVEN-minetest_game.sh | 8 +++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build-minetest-here.sh b/build-minetest-here.sh index 98f8d65..fef6fd8 100755 --- a/build-minetest-here.sh +++ b/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`'." diff --git a/minetestenv.rc b/minetestenv.rc index 4b6d494..848016f 100644 --- a/minetestenv.rc +++ b/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" diff --git a/utilities/extra/install-ENLIVEN-minetest_game.sh b/utilities/extra/install-ENLIVEN-minetest_game.sh index 48fd834..e1cc88b 100755 --- a/utilities/extra/install-ENLIVEN-minetest_game.sh +++ b/utilities/extra/install-ENLIVEN-minetest_game.sh @@ -1119,11 +1119,11 @@ if [ -f "`command -v blender`" ]; then fi echo "Hopefully 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 ." 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)."