diff options
author | Aki <please@ignore.pl> | 2022-08-17 23:16:25 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-08-17 23:16:25 +0200 |
commit | bc5e7b154c0160c7f512f9d0a1ad85de9b38edbe (patch) | |
tree | dfbd342d55ac168818ccced20b5ab2926ce990c0 /data/files.sh | |
parent | f43e9001be7f8cfec9b1fd38ebc9fa2211e6c6c2 (diff) | |
download | starshatter-bc5e7b154c0160c7f512f9d0a1ad85de9b38edbe.zip starshatter-bc5e7b154c0160c7f512f9d0a1ad85de9b38edbe.tar.gz starshatter-bc5e7b154c0160c7f512f9d0a1ad85de9b38edbe.tar.bz2 |
Added some utility scripts I used for some datafiles inspections
Diffstat (limited to 'data/files.sh')
-rwxr-xr-x | data/files.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/data/files.sh b/data/files.sh new file mode 100755 index 0000000..11c6b01 --- /dev/null +++ b/data/files.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Lists interesting files in package in $1. Output can be modified by setting $2 to "-print0". By default it lists all +# files that are usually not part of the repository. This can be reverted by setting $3 to "!". For example: +# +# $ ./files.sh start -print ! +# +# Will list all "non-binary" files that are below 'start/' directory. In case of unmodified state of the repository this +# means a couple of *.def files. + +test -d "$1" || exit 1 +exec find "$1" -type f -a $3 \( \ + -iname '*.pcx' -o \ + -iname '*.jpg' -o \ + -iname '*.mag' -o \ + -iname '*.wav' -o \ + -iname '*.pal' -o \ + -iname '*.ogg' -o \ + -iname '*.ipl' \) ${2:--print} |