forked from mtcontrib/leaftest
Abort if minetestmapper isn't found
This commit is contained in:
parent
3941527d18
commit
fd43a4f545
10
mapper.sh
10
mapper.sh
@ -8,6 +8,14 @@ if [ -z $MAPPERDIR ]; then
|
|||||||
MAPPERDIR=.
|
MAPPERDIR=.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mapperpath=$MAPPERDIR/minetestmapper
|
||||||
|
|
||||||
|
if [ ! -f $mapperpath ]; then
|
||||||
|
echo "Error, "$mapperpath" doesn't exist."
|
||||||
|
echo "Please specify the path to the minetestmapper executable via the MAPPERDIR variable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
scriptdir=`readlink -f $0`
|
scriptdir=`readlink -f $0`
|
||||||
scriptdir=`dirname $scriptdir`
|
scriptdir=`dirname $scriptdir`
|
||||||
|
|
||||||
@ -31,7 +39,7 @@ do
|
|||||||
do
|
do
|
||||||
posx=$(($spawnx+$tilesize*($x-$tilenum/2)))
|
posx=$(($spawnx+$tilesize*($x-$tilenum/2)))
|
||||||
posy=$(($spawny+$tilesize*($tilenum/2-$y)))
|
posy=$(($spawny+$tilesize*($tilenum/2-$y)))
|
||||||
$MAPPERDIR/minetestmapper ${MAPPERPARAMS} -i ${MAPDIR} --geometry ${posx},${posy}+${tilesize}+${tilesize} -o ${tiledir}/20/map_${x}_${y}.png
|
$mapperpath ${MAPPERPARAMS} -i ${MAPDIR} --geometry ${posx},${posy}+${tilesize}+${tilesize} -o ${tiledir}/20/map_${x}_${y}.png
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user