Browse Source

Do not depend on pwd. Add more config--see Changelog.

master
poikilos 5 years ago
parent
commit
6d0d12a179
  1. 15
      changelog.md
  2. 160
      install-mts.sh
  3. 51
      readme.md
  4. 23
      reset-minetest-install-source.sh
  5. 10
      versionize.sh

15
changelog.md

@ -5,7 +5,20 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/).
## [git] - 2020-03-11
## [git] - 2020-03-29
### Added
- Add "Linux Server Install or Upgrade" section to
[readme.md](readme.md).
### Fixed
- Fix counting of screenshots (`*` doesn't work in quotes)
### Changed
- Do not depend on pwd.
- Use more variables from scripting.rc if they are present.
## [git] - 2020-03-29
### Changed
- Use $HOME/.config/EnlivenMinetest to store downloads.

160
install-mts.sh

@ -5,7 +5,7 @@ echo
echo
echo "Starting install..."
MY_NAME="install-mts.sh"
config_path="$HOME/.config/EnlivenMinetest"
EM_CONFIG_PATH="$HOME/.config/EnlivenMinetest"
date
customDie() {
@ -63,28 +63,48 @@ dest_programs="$HOME"
#NOTE: $HOME is still used further down, for $HOME/.* and $HOME/i_am_dedicated_minetest_server flag file (which can be empty)
#TODO: change $HOME/i_am_dedicated_minetest_server to $HOME/.config/EnlivenMinetest/i_am_dedicated_minetest_server or rc file
extracted_name="linux-minetest-kit"
extracted_path="$config_path/$extracted_name"
cd "$config_path" || customDie "[$MY_NAME] cd \"$config_path\" failed."
extracted_path="$EM_CONFIG_PATH/$extracted_name"
cd "$EM_CONFIG_PATH" || customDie "[$MY_NAME] cd \"$EM_CONFIG_PATH\" failed."
flag_dir_rel="$extracted_name/mtsrc"
flag_dir="$extracted_path/mtsrc"
enable_client=false
custom_scripts_dir="$HOME"
custom_script_name="mts.sh"
if [ -f "$custom_scripts_dir/mts-CenterOfTheSun.sh" ]; then
custom_script_name="mts-CenterOfTheSun.sh"
if [ -z "$CUSTOM_SCRIPTS_PATH" ]; then
CUSTOM_SCRIPTS_PATH="$HOME"
fi
MT_POST_INSTALL_SCRIPT_1=archive-minetestserver-debug.sh
scripting_rc_path=~/.config/EnlivenMinetest/scripting.rc
if [ -z "$MT_POST_INSTALL_SCRIPT_2" ]; then
MT_POST_INSTALL_SCRIPT_2="mts.sh"
if [ -f "$CUSTOM_SCRIPTS_PATH/mts-CenterOfTheSun.sh" ]; then
MT_POST_INSTALL_SCRIPT_2="mts-CenterOfTheSun.sh"
else
if [ ! -f $CUSTOM_SCRIPTS_PATH/$MT_POST_INSTALL_SCRIPT_2 ]; then
cat <<END
* If $MT_POST_INSTALL_SCRIPT_2 were in $CUSTOM_SCRIPTS_PATH, then it
will run after compiling is finished. You can also set
MT_POST_INSTALL_SCRIPT_2 to determine what filename to run, and set
CUSTOM_SCRIPTS_PATH to determine where it (and
$MT_POST_INSTALL_SCRIPT_1 which runs first if present there) is
located. You can set the variables in
$scripting_rc_path or the environment.
END
fi
fi
fi
if [ -z "$ENABLE_CLIENT" ]; then
ENABLE_CLIENT=false
fi
if [ -f ~/.config/EnlivenMinetest/scripting.rc ]; then
echo "Running $scripting_rc_path..."
if [ -f "$EM_CONFIG_PATH/scripting.rc" ]; then
echo "Using $scripting_rc_path..."
source $scripting_rc_path
# may contain any variables above, plus:
# * enable_run_after_compile: if true, then run the server, such as
# ~/mts-CenterOfTheSun.sh
else
echo "* skipping $scripting_rc_path (not present)"
echo " (can contain settings such as enable_run_after_compile)"
echo " (can contain settings such as enable_run_after_compile=true)"
fi
pushd "$extracted_path" || customDie "pushd \"$extracted_path\" failed in \"`pwd`\""
@ -93,7 +113,7 @@ extra_options=""
for var in "$@"
do
if [ "@$var" = "@--client" ]; then
enable_client=true
ENABLE_CLIENT=true
elif [ "@$var" = "@--clean" ]; then
enable_clean=true
elif [ "@$var" = "@--noclean" ]; then
@ -110,17 +130,19 @@ fi
echo "enable_clean=\"$enable_clean\"..."
# flag_icon="$HOME/Desktop/org.minetest.minetest.desktop"
good_mts="$extracted_path/minetest/bin/minetestserver"
good_mt="$extracted_path/minetest/bin/minetest"
flag_client_dest_file="$dest_programs/minetest/bin/minetest"
flag_file="minetest/bin/minetestserver"
flag_file="$good_mts"
if [ -f "$flag_client_dest_file" ]; then
enable_client=true
ENABLE_CLIENT=true
echo "* automatically adding --client to compile since detected"
echo " '$flag_client_dest_file'"
# echo "--press Ctrl C to cancel..."
# sleep 2
fi
if [ "@$enable_client" = "@true" ]; then
flag_file="minetest/bin/minetest"
if [ "@$ENABLE_CLIENT" = "@true" ]; then
flag_file="$good_mt"
extra_options="--client"
fi
#if [ -f "$flag_file" ]; then
@ -131,31 +153,30 @@ fi
#exit 1
#fi
enable_compile=true
flag_mts="$extracted_path/minetest/bin/minetestserver"
flag_mt="$extracted_path/minetest/bin/minetest"
has_any_binary=false
if [ -f "$flag_mts" ]; then
if [ -f "$good_mts" ]; then
has_any_binary=true
fi
if [ -f "$flag_mt" ]; then
if [ -f "$good_mt" ]; then
has_any_binary=true
fi
if [ "@$has_any_binary" == "@true" ]; then
enable_compile=false
if [ "@$enable_client" = "@true" ]; then
if [ ! -f minetest/bin/minetest ]; then
if [ "@$ENABLE_CLIENT" = "@true" ]; then
if [ ! -f "$good_mt" ]; then
enable_compile=true
echo "* enabling compile (since no `pwd`/minetest/bin/minetest but client install is enabled)"
fi
fi
if [ "@$enable_server" = "@true" ]; then
if [ ! -f minetest/bin/minetestserver ]; then
if [ ! -f "$good_mts" ]; then
enable_compile=true
echo "* enabling compile (since no `pwd`/minetest/bin/minetestserver)"
fi
fi
else
echo "* enabling compile since neither \"$flag_mts\" nor \"$flag_mt\" are present."
echo "* enabling compile since neither \"$good_mts\" nor \"$good_mt\" are present."
fi
if [ "@$enable_compile" = "@true" ]; then
echo "* checking if the compile library script extracted the program source yet ($flag_dir)..."
@ -174,6 +195,7 @@ END
fi
start=`date +%s`
cd "$extracted_path" || customDie "cd \"$extracted_path\" failed."
if [ -f "mtcompile-program.pl" ]; then
# perl mtcompile-program.pl build >& program.log
echo "Compiling via perl (this may take a while--output redirected to `pwd`/program.log)..."
@ -197,7 +219,7 @@ END
echo "Compiling the program finished in $compile_time seconds."
cp $extracted_path/release.txt $extracted_path/minetest/ || customWarn "Cannot copy $extracted_path/release.txt to $extracted_path/minetest/"
else
echo "* using existing minetest..."
echo "* using existing $extracted_path/minetest..."
fi
if [ ! -f "$flag_file" ]; then
customDie "The build did not complete since '$flag_file' is missing. Maybe you didn't compile the libraries. Running reset-minetest-install-source.sh should do that automatically, but you can also do: cd $extracted_path && ./mtcompile-libraries.sh build"
@ -209,8 +231,8 @@ fi
if [ -f "$dest_flag_file" ]; then
customDie "Install is incomplete because it can't move '$dest_flag_file'."
fi
if [ ! -d minetest ]; then
customDie "Install is incomplete because `pwd`/minetest is missing."
if [ ! -d "$extracted_path/minetest" ]; then
customDie "Install is incomplete because \"$extracted_path/minetest\" is missing."
fi
virtual_dest="$dest_programs/minetest"
link_target=`readlink $virtual_dest`
@ -268,14 +290,14 @@ if [ ! -z "$link_target" ]; then
echo "* detected that $virtual_dest is a symlink to $link_target"
echo " (redirecting rsync to prevent symlink to dir conversion: installing to $install_dest"
echo " and recreating symlink '$virtual_dest' pointing to '$install_dest')..."
rsync -rt "minetest/" "$install_dest" || customDie "Cannot rsync files from installer data `pwd`/minetest/ to $install_dest"
rsync -rt "$extracted_path/minetest/" "$install_dest" || customDie "Cannot rsync files from installer data $extracted_path/minetest/ to $install_dest"
if [ ! -d "$dest_programs/minetest" ]; then
echo "* creating link to $install_dest directory as $dest_programs/minetest..."
ln -s "$install_dest" "$dest_programs/minetest"
fi
else
echo "Installing minetest directory to '$dest_programs'..."
rsync -rt --info=progress2 minetest/ $install_dest || customDie "Cannot rsync files from installer data `pwd`/minetest/ to $install_dest"
echo "Installing \"$extracted_path/minetest\" directory to \"$dest_programs\"..."
rsync -rt --info=progress2 $extracted_path/minetest/ $install_dest || customDie "Cannot rsync files from installer data $extracted_path/minetest/ to $install_dest"
fi
if [ ! -f "$dest_flag_file" ]; then
customDie "ERROR: not complete--couldn't install binary as '$dest_flag_file'"
@ -305,20 +327,20 @@ fi
popd
# pushd .. # go from EnlivenMinetest/webapp to EnlivenMinetest
PATCHES_DIR="patches"
# PATCHES_DIR_NAME="patches"
if [ -z "$REPO_PATH" ]; then
REPO_PATH="$HOME/git/EnlivenMinetest"
fi
PATCHES_PATH="$REPO_PATH/patches"
if [ -d "$PATCHES_PATH" ]; then
pushd "$REPO_PATH"
# pushd "$REPO_PATH"
src="patches/subgame/menu"
src="$PATCHES_PATH/subgame/menu"
dst="$dest_programs/minetest/games/ENLIVEN/menu"
echo "updating '$dst' from '$src/'..."
rsync -rt "$src/" "$dst"
src="patches/Bucket_Game-patched"
src="$PATCHES_PATH/Bucket_Game-patched"
dst="$dest_programs/minetest/games/ENLIVEN"
echo "updating '$dst' from '$src/'..."
rsync -rt "$src/" "$dst"
@ -337,12 +359,12 @@ game_minetest_conf_dest="$dest_programs/minetest/games/ENLIVEN/minetest.conf"
client_example_dest="$dest_programs/minetest/minetest.ENLIVEN.client-example.conf"
echo "Installing minetest.ENLIVEN.*-example.conf files..."
cp -f "patches/subgame/minetest.LAN-client-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.LAN-client-example.conf" || customDie "Cannot copy minetest.ENLIVEN.LAN-client-example.conf"
cp -f "patches/subgame/minetest.server-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.server-example.conf" || customDie "Cannot copy minetest.ENLIVEN.server-example.conf"
cp -f "patches/subgame/minetest.client-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.client-example.conf" || customDie "Cannot copy minetest.ENLIVEN.client-example.conf"
cp -f "$PATCHES_PATH/subgame/minetest.LAN-client-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.LAN-client-example.conf" || customDie "Cannot copy minetest.ENLIVEN.LAN-client-example.conf"
cp -f "$PATCHES_PATH/subgame/minetest.server-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.server-example.conf" || customDie "Cannot copy minetest.ENLIVEN.server-example.conf"
cp -f "$PATCHES_PATH/subgame/minetest.client-example.conf" "$dest_programs/minetest/minetest.ENLIVEN.client-example.conf" || customDie "Cannot copy minetest.ENLIVEN.client-example.conf"
echo "Writing '$game_minetest_conf_dest'..."
cp -f "patches/subgame/minetest.conf" "$game_minetest_conf_dest"
cp -f "$PATCHES_PATH/subgame/minetest.conf" "$game_minetest_conf_dest"
# client conf writing only ever happens once, unless you manually delete $minetest_conf_dest:
if [ ! -f "$minetest_conf_dest" ]; then
@ -355,9 +377,9 @@ if [ ! -f "$minetest_conf_dest" ]; then
# fi
# fi
echo "Writing minetest.conf (client region)..."
cp -f "patches/subgame/minetest.client-example.conf" "$minetest_conf_dest" || customDie "Cannot copy minetest.client-example.conf to $minetest_conf_dest"
cp -f "$PATCHES_PATH/subgame/minetest.client-example.conf" "$minetest_conf_dest" || customDie "Cannot copy minetest.client-example.conf to $minetest_conf_dest"
echo "Appending example settings (server region) to '$minetest_conf_dest'..."
cat "patches/subgame/minetest.server-example.conf" >> "$minetest_conf_dest" || customDie "Cannot append minetest.server-example.conf"
cat "$PATCHES_PATH/subgame/minetest.server-example.conf" >> "$minetest_conf_dest" || customDie "Cannot append minetest.server-example.conf"
else
echo "$minetest_conf_dest exists (remove it if you want the installer to write an example version)"
fi
@ -410,7 +432,7 @@ fi
enable_clear_icon_cache=false
if [ "@$enable_client" = "@true" ]; then
if [ "@$ENABLE_CLIENT" = "@true" ]; then
dest_icons=$HOME/.local/share/applications
dest_icon=$dest_icons/org.minetest.minetest.desktop
# if [ -f "$dest_icon" ]; then
@ -421,7 +443,7 @@ if [ "@$enable_client" = "@true" ]; then
# enable_clear_icon_cache=true
# fi
echo "Writing icon '$dest_icon'..."
cat "patches/deploy-patched/misc/org.minetest.minetest.desktop" | grep -v Icon | grep -v Path | grep -v Exec > "$dest_icon"
cat "$PATCHES_PATH/deploy-patched/misc/org.minetest.minetest.desktop" | grep -v Icon | grep -v Path | grep -v Exec > "$dest_icon"
# Icon must be an absolute path (other variables use $HOME in
# desktop file above), so exclude it above and rewrite it below:
echo "Icon=$dest_programs/minetest/misc/minetest-xorg-icon-128.png" >> "$dest_icon"
@ -460,45 +482,45 @@ if [ "@$enable_client" = "@true" ]; then
fi
if [ -f $dest_programs/minetest/games/ENLIVEN/mods/codermobs/codermobs/animal_materials.lua ]; then
if [ -d patches/mods-stopgap/animal_materials_legacy ]; then
if [ -d $PATCHES_PATH/mods-stopgap/animal_materials_legacy ]; then
echo "* installing animal_materials_legacy (only needed for worlds created with old versions of Bucket_Game)"
rsync -rt patches/mods-stopgap/animal_materials_legacy $dest_programs/minetest/games/ENLIVEN/mods/
rsync -rt $PATCHES_PATH/mods-stopgap/animal_materials_legacy $dest_programs/minetest/games/ENLIVEN/mods/
else
echo "* MISSING patches/mods-stopgap/animal_materials"
echo "* MISSING $PATCHES_PATH/mods-stopgap/animal_materials"
fi
else
echo "* SKIPPING a stopgap mod since no animal_materials"
fi
if [ -f $dest_programs/minetest/games/ENLIVEN/mods/codermobs/codermobs/elk.lua ]; then
if [ -d patches/mods-stopgap/elk_legacy ]; then
if [ -d $PATCHES_PATH/mods-stopgap/elk_legacy ]; then
echo "* installing elk_legacy (only needed for worlds created with old versions of Bucket_Game)"
rsync -rt patches/mods-stopgap/elk_legacy $dest_programs/minetest/games/ENLIVEN/mods/
rsync -rt $PATCHES_PATH/mods-stopgap/elk_legacy $dest_programs/minetest/games/ENLIVEN/mods/
else
echo "* MISSING patches/mods-stopgap/elk_legacy"
echo "* MISSING $PATCHES_PATH/mods-stopgap/elk_legacy"
fi
else
echo "* SKIPPING a stopgap mod since no elk.lua"
fi
if [ -d "$dest_programs/minetest/games/ENLIVEN/mods/coderbuild/nftools" ]; then
if [ -d patches/mods-stopgap/nftools_legacy ]; then
if [ -d $PATCHES_PATH/mods-stopgap/nftools_legacy ]; then
echo "* installing nftools_legacy (only needed for worlds created with old versions of Bucket_Game)"
rsync -rt patches/mods-stopgap/nftools_legacy $dest_programs/minetest/games/ENLIVEN/mods/
rsync -rt $PATCHES_PATH/mods-stopgap/nftools_legacy $dest_programs/minetest/games/ENLIVEN/mods/
else
echo "* MISSING patches/mods-stopgap/nftools_legacy"
echo "* MISSING $PATCHES_PATH/mods-stopgap/nftools_legacy"
fi
else
echo "* SKIPPING a stopgap mod since no nftools"
fi
popd
# popd
else
cat <<END
$PATCHES_PATH is missing. To fix this, set the REPO_PATH environment variable like:
$PATCHES_PATH is missing. To fix this, set:
REPO_PATH=$HOME/git/EnlivenMinetest $MY_NAME
# (where $HOME/git/EnlivenMinetest is the actual repo path).
REPO_PATH=$HOME/git/EnlivenMinetest
# in \"$scripting_rc_path\" or the environment.
END
fi
@ -528,23 +550,23 @@ fi
if [ "@$enable_run_after_compile" = "@true" ]; then
echo "Trying to run minetest or other custom post-install script"
echo "(enable_run_after_compile is true in '$scripting_rc_path')."
if [ -d "$custom_scripts_dir" ]; then
pushd "$custom_scripts_dir"
if [ -f archive-minetestserver-debug.sh ]; then
./archive-minetestserver-debug.sh
echo "NOTE: if you put archive-minetestserver-debug.sh"
if [ -d "$CUSTOM_SCRIPTS_PATH" ]; then
cd "$CUSTOM_SCRIPTS_PATH" || customDie "cd $CUSTOM_SCRIPTS_PATH failed."
if [ -f "$MT_POST_INSTALL_SCRIPT_1" ]; then
./$MT_POST_INSTALL_SCRIPT_1
echo "NOTE: if you put $MT_POST_INSTALL_SCRIPT_1"
echo " in `pwd`, it would run at this point if"
echo " marked executable."
fi
if [ -f "$custom_script_name" ]; then
./$custom_script_name
echo "$custom_script_name finished (exit code $?)"
if [ -f "$MT_POST_INSTALL_SCRIPT_2" ]; then
./$MT_POST_INSTALL_SCRIPT_2
echo "$MT_POST_INSTALL_SCRIPT_2 finished (exit code $?)"
else
cat <<END
ERROR: enable_run_after_compile is true, but
'$custom_script_name' is not in
'$custom_scripts_dir'.
Try setting custom_scripts_dir and custom_script_name in
'$MT_POST_INSTALL_SCRIPT_2' is not in
'$CUSTOM_SCRIPTS_PATH'.
Try setting CUSTOM_SCRIPTS_PATH and MT_POST_INSTALL_SCRIPT_2 in
'$scripting_rc_path'
END
fi
@ -552,8 +574,8 @@ END
else
cat <<END
ERROR: enable_run_after_compile is true, but
'$custom_scripts_dir'
does not exist. Try setting custom_scripts_dir in
'$CUSTOM_SCRIPTS_PATH'
does not exist. Try setting CUSTOM_SCRIPTS_PATH in
'$scripting_rc_path'.
END
fi

51
readme.md

@ -15,12 +15,14 @@ by [Poikilos](https://github.com/poikilos)
using other subgames, which client will download from servers as
usual.
## Primary Features of EnlivenMinetest Project
* Server installer for ENLIVEN on linux server (Ubuntu so far)
* Client installer for single-player ENLIVEN, including on Windows
* automatically install Minetest client with a usable minetest.conf (for
improved graphics)
## Primary Features of ENLIVEN subgame
* birthstones, improved fork: <https://github.com/poikilos/birthstones>
(also part of Bucket_Game)
@ -95,6 +97,55 @@ bash install-mts.sh --client
contact the maintainer of your window manager. This works in KDE on
Fedora 29. Workaround: copy the icon from there to your desktop.)
## Linux Server Install or Upgrade
```
cd ~/git/EnlivenMinetest
./reset-minetest-install-source.sh && ./versionize && ./install-mts.sh
# You can leave out `&& ./versionize` if you don't want to keep old
# copies.
```
### Using install-mts.sh
You must first run reset-minetest-install-source.sh to compile the
libraries automatically, or otherwise have run the compile libraries
script in `~/.config/EnlivenMinetest/linux-minetest-kit`, or at least
have already compiled Minetest there. If the minetest or
minetestserver binary (or just minetestserver if client is not enabled)
is not present there (in
`~/.config/EnlivenMinetest/linux-minetest-kit/minetest/bin/`), the
script will try to compile the program before installing or stop if it
cannot.
#### Arguments
- `--clean` is the recommended option, and is the default. It
erases Bucket_Game and causes ENLIVEN to be remade using Bucket_Game.
- It backs up skins, but that is not necessary anymore since
coderskins uses world storage (follow this issue at
<https://github.com/poikilos/EnlivenMinetest/issues/382>).
- `--client` installs the client too. Since "install-mts.sh" stands for
"Install minetestserver," the `--client` option is off by default
(See the "Configuration Files" section for how to change the default).
#### Configuration Files
You can place zero or more of the following variables in
$HOME/.config/EnlivenMinetest/scripting.rc:
```
CUSTOM_SCRIPTS_PATH
MT_POST_INSTALL_SCRIPT_2 # relative to CUSTOM_SCRIPTS_PATH
REPO_PATH # Set this if your copy of the repo is not ~/git/EnlivenMinetest
ENABLE_CLIENT # =true if you want install-mts.sh to install the client.
```
- If ~/minetest/bin/minetest is present, that has the same effect as
`ENABLE_CLIENT=true`.
You can place a script called mts.sh in your home (or
CUSTOM_SCRIPTS_PATH) directory to run it after install (you can put
archive-minetestserver-debug.sh there too to run first). A suggested use
is to put a line in mts.sh that starts the server, so that the server
starts after the installation or upgrade is complete.
## How to use
### Windows Client

23
reset-minetest-install-source.sh

@ -5,13 +5,14 @@ echo
echo "Starting cleanup and library rebuild..."
date
MY_NAME="reset-minetest-install-source.sh"
config_path=$HOME/.config/EnlivenMinetest
EM_CONFIG_PATH=$HOME/.config/EnlivenMinetest
zip_name=linux-minetest-kit.zip
extracted_name=linux-minetest-kit
config_path=~/.config/EnlivenMinetest
if [ ! -d "$config_path" ]; then
mkdir -p "$config_path"
EM_CONFIG_PATH=~/.config/EnlivenMinetest
extracted_path="$EM_CONFIG_PATH/$extracted_name"
if [ ! -d "$EM_CONFIG_PATH" ]; then
mkdir -p "$EM_CONFIG_PATH"
fi
in_use_name=minetest
@ -83,10 +84,16 @@ do
customDie "Invalid argument: $var"
fi
done
cd "$config_path" || customDie "[$MY_NAME] cd \"$config_path\" failed."
if [ -d "$extracted_name" ]; then
if [ "`ls -lR screenshots/*.png | wc -l`" -gt 0 ]; then
mv screenshots/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png"
cd "$EM_CONFIG_PATH" || customDie "[$MY_NAME] cd \"$EM_CONFIG_PATH\" failed."
if [ -d "$extracted_path" ]; then
# NOTE: ls -lR $extracted_path/screenshots/
screenshot_count=0
if [ -d $extracted_path/screenshots/ ]; then
screenshot_count="`ls $extracted_path/screenshots/ | wc -l`"
fi
if [ $screenshot_count -gt 0 ]; then
mv $extracted_path/screenshots/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png"
rmdir --ignore-fail-on-non-empty screenshots
fi
if [ "`ls -lR $extracted_name/minetest/bin/*.png | wc -l`" -gt 0 ]; then

10
versionize.sh

@ -2,8 +2,8 @@
echo
echo "Collecting version..."
MY_NAME="versionize.sh"
config_path=$HOME/.config/EnlivenMinetest
cd "$config_path" || customDie "[$MY_NAME] cd \"$config_path\" failed."
EM_CONFIG_PATH=$HOME/.config/EnlivenMinetest
cd "$EM_CONFIG_PATH" || customDie "[$MY_NAME] cd \"$EM_CONFIG_PATH\" failed."
if [ -z "$original_src_path" ]; then
original_src_path="$1"
fi
@ -51,13 +51,13 @@ customDie() {
destroy_msg=""
# src_path: extracted name (always linux-mintetest-kit unless source is
# archive, in which case src_path is detected)
src_path="$config_path/linux-minetest-kit"
versions_path="$config_path/minetest-versions"
src_path="$EM_CONFIG_PATH/linux-minetest-kit"
versions_path="$EM_CONFIG_PATH/minetest-versions"
if [ ! -d "$versions_path" ]; then
mkdir -p "$versions_path" || customDie "mkdir $versions_path FAILED"
fi
src_name=""
try_path="$config_path/$original_src_path"
try_path="$EM_CONFIG_PATH/$original_src_path"
if [ -f "$original_src_path" ]; then
echo "* detected file param..."
elif [ -d "$original_src_path" ]; then

Loading…
Cancel
Save