diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-11 23:00:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-11 23:00:34 -0400 |
commit | 7ba9640e1d0be46952ded1922adf00fd10ceb8a5 (patch) | |
tree | 16945813f931406d967308ca2b16c454f9a1bdf6 /tools/notsd-fixup | |
parent | fa89550518af96a8804749c0ab0916599a94c1da (diff) |
tools/notsd-fixup: allow filtering which files get fixed, add gperf
Diffstat (limited to 'tools/notsd-fixup')
-rwxr-xr-x | tools/notsd-fixup | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/notsd-fixup b/tools/notsd-fixup index 0bd5c10bd9..868260e503 100755 --- a/tools/notsd-fixup +++ b/tools/notsd-fixup @@ -4,7 +4,7 @@ # is that we want errors from the inner loop to bubble up. fixup_makefiles() ( - find -type f -name Makefile | while read -r filename; do + find "$@" -type f -name Makefile | while read -r filename; do sed -r -i "s|(/\.\.)*/config.mk|/$(realpath -ms --relative-to="${filename%/*}" config.mk)|" "$filename" done ) @@ -17,7 +17,7 @@ fixup_includes() ( popd >/dev/null done - find src \( -name '*.h' -o -name '*.c' \) -type f | while read -r filename; do + find "$@" \( -name '*.h' -o -name '*.c' -o -name '*.gperf' \) -type f | while read -r filename; do "$0"--includes "$filename" done ) @@ -25,8 +25,8 @@ fixup_includes() ( main() { set -e set -o pipefail - fixup_makefiles - fixup_includes + fixup_makefiles "$@" + fixup_includes "$@" } main "$@" |