echo"* automatically adding --client to compile since detected"
echo"* automatically adding --client to compile since detected"
echo" '$flag_client_dest_file'"
echo" '$good_dst_mt'"
# 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="$good_mt"
this_src_flag_path="$good_src_mt"
this_dst_flag_path="$good_dst_mt"
extra_options="--client"
extra_options="--client"
fi
fi
#if [ -f "$flag_file" ]; then
#if [ -f "$this_src_flag_path" ]; then
#rm -f "$flag_file"
#rm -f "$this_src_flag_path"
#fi
#fi
#if [ -f "$flag_file" ]; then
#if [ -f "$this_src_flag_path" ]; then
#echo "ERROR: Nothing done since can't remove old '$flag_file'"
#echo "ERROR: Nothing done since can't remove old '$this_src_flag_path'"
#exit 1
#exit 1
#fi
#fi
enable_compile=true
enable_compile=true
has_any_binary=false
has_any_binary=false
if[ -f "$good_mts"];then
if[ -f "$good_src_mts"];then
has_any_binary=true
has_any_binary=true
fi
fi
if[ -f "$good_mt"];then
if[ -f "$good_src_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 "$good_mt"];then
if[ ! -f "$good_src_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 "$good_mts"];then
if[ ! -f "$good_src_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 \"$good_mts\" nor \"$good_mt\" are present."
echo"* enabling compile since neither \"$good_src_mts\" nor \"$good_src_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 ($code_flag_dir_path)..."
if[ ! -d "$flag_dir"];then
if[ ! -d "$code_flag_dir_path"];then
cat <<END
cat <<END
ERROR: missing $flag_dir_rel
ERROR: missing $flag_dir_rel
- If you do not have an extracted minetest source directory which
- If you do not have an extracted minetest source directory which
@ -221,15 +224,14 @@ END
else
else
echo"* using existing $extracted_path/minetest..."
echo"* using existing $extracted_path/minetest..."
fi
fi
if[ ! -f "$flag_file"];then
if[ ! -f "$this_src_flag_path"];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 '$this_src_flag_path' 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 "Install is incomplete because it can't move '$dest_flag_file'."
customDie "Install is incomplete because it can't move '$this_dst_flag_path'."
fi
fi
if[ ! -d "$extracted_path/minetest"];then
if[ ! -d "$extracted_path/minetest"];then
customDie "Install is incomplete because \"$extracted_path/minetest\" is missing."
customDie "Install is incomplete because \"$extracted_path/minetest\" is missing."
@ -299,26 +301,26 @@ else
echo"Installing \"$extracted_path/minetest\" directory to \"$dest_programs\"..."
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"
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 "$this_dst_flag_path"];then
customDie "ERROR: not complete--couldn't install binary as '$dest_flag_file'"
customDie "ERROR: not complete--couldn't install binary as '$this_dst_flag_path'"