-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some shell scripts for processing/building
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
lba1.json | ||
lba2.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# LBA Gamequotes | ||
|
||
|
||
# Development | ||
|
||
The `jq` utility is used for a lot of parts in the development process. | ||
|
||
## Building | ||
|
||
The quotes are stored in separate JSON files for each game, based on the TEXT | ||
resource file entry. | ||
|
||
These sperate files can be bundled into a single JSON file with the | ||
`bin/merge.sh` shell script. | ||
|
||
``` | ||
bin/merge.sh lba1 lba2 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if ! command -v jq &> /dev/null | ||
then | ||
echo "jq not installed" | ||
exit 1 | ||
fi | ||
|
||
for DIR in $@; do | ||
if [ -d "$DIR" ]; then | ||
echo "Merging $DIR/*.json into $DIR.json ..." | ||
cat $DIR/*.json | jq -s '[ .[] | .[] ]' > "$DIR.json" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if ! command -v jq &> /dev/null | ||
then | ||
echo "jq not installed" | ||
exit 1 | ||
fi | ||
|
||
RESULT=0 | ||
for FILE in $@; do | ||
echo "Validating $FILE" | ||
if ! $(jq 'empty' "$FILE"); then | ||
RESULT=1 | ||
fi | ||
done | ||
|
||
exit $RESULT |