Browse Source

Better error handling

master
Perttu Ahola 10 years ago
parent
commit
3bed63205c
  1. 4
      minetest-worldtest-check-and-set.sh
  2. 12
      minetest-worldtest.sh

4
minetest-worldtest-check-and-set.sh

@ -15,10 +15,10 @@ worlddir=$2
#echo "-- Making world in $worlddir using $gamedir"
echo "-- Making world `basename $worlddir`"
pushd "$gamedir" &>/dev/null
pushd "$gamedir" &>/dev/null || exit 1
# Configuration file is the common runtime configuration method
echo -e "map-dir = $worlddir\nenable_mapgen_debug_info = true\n" > worldtest_config
mkdir -p "$worlddir"
mkdir -p "$worlddir" || exit 1
if ! [ -a "$worlddir/world.mt" ]; then
echo -e 'gameid = minimal' > "$worlddir/world.mt"
fi

12
minetest-worldtest.sh

@ -50,11 +50,11 @@ build_minetest ()
pkg=$3
mtdir=$4
rm -rf "$mtdir"
mkdir -p "$mtdir"
pushd "$mtdir" &>/dev/null
rm -rf "$mtdir" || return 1
mkdir -p "$mtdir" || return 1
pushd "$mtdir" &>/dev/null || return 1
# Extract package
tar -xf "$pkg"
tar -xf "$pkg" || return 1
# Patch stuff
for patchfile in $ruledir/*.patch; do
@ -71,6 +71,10 @@ build_minetest ()
# Build it
cmake . -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0
if [ "$?" == "1" ]; then
echo "EE Error preparing build for $tag"
return 1
fi
make -j2
if [ "$?" == "1" ]; then
echo "EE Error building $tag"

Loading…
Cancel
Save