mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 15:49:56 +00:00
2a653e45fd
Just give it a set of files, one file per argument, and it will make sure openmw can read them.
28 lines
778 B
Bash
Executable file
28 lines
778 B
Bash
Executable file
#!/bin/bash
|
|
#Script to test all nif files (both loose, and in BSA archives) in data files directory
|
|
|
|
#The user input as an absolute path
|
|
DATAFILESDIR="`readlink -m "$1"`"
|
|
#Program used to test
|
|
TEST_PROG="`pwd`/niftest"
|
|
|
|
#Make sure our files don't bother anyone
|
|
NIFTEST_TMP_DIR="/tmp/niftest_$RANDOM/"
|
|
mkdir "$NIFTEST_TMP_DIR"
|
|
cd "$NIFTEST_TMP_DIR"
|
|
|
|
find "$DATAFILESDIR" -iname *bsa > nifs.txt
|
|
find "$DATAFILESDIR" -iname *nif >> nifs.txt
|
|
|
|
sed -e 's/.*/\"&\"/' nifs.txt > quoted_nifs.txt
|
|
|
|
xargs --arg-file=quoted_nifs.txt "$TEST_PROG" 2>&1 | tee nif_out.txt
|
|
# xargs --arg-file=quoted_nifs.txt "$TEST_PROG" 2> nif_out.txt >/dev/null
|
|
|
|
echo "List of bad NIF Files:"
|
|
cat nif_out.txt|grep File:|cut -d ' ' -f 2-
|
|
|
|
rm nifs.txt
|
|
rm quoted_nifs.txt
|
|
rm nif_out.txt
|
|
rmdir "$NIFTEST_TMP_DIR"
|