1
0
réplica de https://github.com/est31/leaftest.git sincronizado 2025-10-21 12:35:46 +02:00

Abort if {montage,convert} fails as well

Este cometimento está contido em:
est31
2016-01-17 18:11:14 +01:00
ascendente 14e314e1bc
cometimento 2efe27f0b0

Ver ficheiro

@@ -64,7 +64,15 @@ do
for y in $(seq 0 $tnum)
do
montage $dirb/map_$(($x*2))_$((y*2)).png $dirb/map_$(($x*2+1))_$((y*2)).png $dirb/map_$(($x*2))_$((y*2+1)).png $dirb/map_$(($x*2+1))_$((y*2+1)).png -geometry +0+0 $dir/map_${x}_${y}.png
if [ $? -ne 0 ]; then
echo "montage exited with non zero exit code, aborting."
exit 1
fi
convert $dir/map_${x}_${y}.png -resize 50% $dir/map_${x}_${y}.png
if [ $? -ne 0 ]; then
echo "convert exited with non zero exit code, aborting."
exit 1
fi
done
done
done