Fixes checking map filenames for multiz maps

This commit is contained in:
AnturK
2020-06-24 10:23:01 +02:00
parent d8de83797c
commit d136f428be
+10 -7
View File
@@ -54,16 +54,19 @@ if grep -i 'centcomm' _maps/**/*.dmm; then
fi;
if ls _maps/*.json | grep -P "[A-Z]"; then
echo "Uppercase in a map json detected, these must be all lowercase."
st=1
st=1
fi;
for json in _maps/*.json
do
filename="_maps/$(jq -r '.map_path' $json)/$(jq -r '.map_file' $json)"
if [ ! -f $filename ]
then
echo "found invalid file reference to $filename in _maps/$json"
st=1
fi
map_path=$(jq -r '.map_path' $json)
while read map_file; do
filename="_maps/$map_path/$map_file"
if [ ! -f $filename ]
then
echo "found invalid file reference to $filename in _maps/$json"
st=1
fi
done < <(jq -r '.map_file' $json)
done
exit $st