Browse Source

improve binary detection logic for client install mode

master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
c718540926
  1. 22
      webapp/install-mts.sh
  2. 5
      webapp/reset-minetest.sh

22
webapp/install-mts.sh

@ -1,4 +1,10 @@
#!/bin/bash
echo
echo
echo
echo "Starting install..."
date
echo "Checking if program is compiled..."
extracted_name=linux-minetest-kit
flag_dir="$extracted_name/mtsrc"
if [ ! -d "$flag_dir" ]; then
@ -6,9 +12,11 @@ if [ ! -d "$flag_dir" ]; then
exit 1
fi
pushd "$extracted_name"
enable_client=false
extra_options=""
if [ "@$1" = "@--client" ]; then
extra_options="--client"
enable_client=true
fi
flag_icon="$HOME/Desktop/org.minetest.minetest.desktop"
flag_file="minetest/bin/minetestserver"
@ -26,9 +34,17 @@ fi
#echo "ERROR: Nothing done since can't remove old '$flag_file'"
#exit 1
#fi
enable_compile=true
if [ -d minetest ]; then
echo "using existing minetest..."
else
enable_compile=false
if [ "@$enable_client" = "@true" ]; then
if [ ! -f minetest/bin/minetest ]; then
enable_compile=true
echo "Recompiling since client was not built before..."
fi
fi
fi
if [ "@$enable_compile" = "@true" ]; then
if [ -f "mtcompile-program.pl" ]; then
# perl mtcompile-program.pl build >& program.log
echo "Compiling via perl..."
@ -38,6 +54,8 @@ else
echo "Compiling via bash..."
bash -e mtcompile-program.sh build --server $extra_options >& program.log
fi
else
echo "using existing minetest..."
fi
if [ ! -f "$flag_file" ]; then
echo "ERROR: Build did not complete--missing '$flag_file'"

5
webapp/reset-minetest.sh

@ -1,4 +1,9 @@
#!/bin/bash
echo
echo
echo
echo "Starting cleanup and library rebuild..."
date
zip_name=linux-minetest-kit.zip
extracted_name=linux-minetest-kit
in_use_name=minetest

Loading…
Cancel
Save