raze/polymer/eduke32/source/lunatic/findmaps.sh
helixhorned 99f9cfca7f foreachmap.lua: add option of only printing matching file names (like grep -l)
Also, add convenience wrapper script findmaps.sh for quickly searching for
sprites/walls/sectors satisfying a certain condition in all map files under
a given directory.

git-svn-id: https://svn.eduke32.com/eduke32@3030 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:54:01 +00:00

16 lines
246 B
Bash
Executable file

#!/bin/sh
ok=yes
if [ -z "$1" ]; then
ok=
fi
if [ -z "$2" ]; then
ok=
fi
if [ -z "$ok" ]; then
echo "Usage: $0 <dir> <code for foreachmap.lua -e>"
exit 1
fi
find -L "$1" -name '*.map' -print0 | xargs -0 ./foreachmap.lua "-e$2"