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