File: language_verify.sh

package info (click to toggle)
openrct2-objects 1.3.7%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 15,956 kB
  • sloc: python: 305; sh: 71; makefile: 25
file content (17 lines) | stat: -rwxr-xr-x 360 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Exit on error.
set -e

# We will need some directions... Let's make sure we get them.
if [ $# -ne 1 ] || [ ! -d $1 ];
    then echo "Usage: $0 <directory>"
    exit
fi

# Traverse input directory, and verify syntax in all files is correct.
find $1 -type f -name '*.json' | {
    while read -r f;
    do jq empty "$f" || echo "in $f";
    done
}