[PATCH 1/3] scripts/remove_COLOPHON.sh: Allow passing directories to the script

Alejandro Colomar
2022-04-15T23:31:04Z

scripts/remove_COLOPHON.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/remove_COLOPHON.sh b/scripts/remove_COLOPHON.sh
index 712106656..780caab98 100755
--- a/scripts/remove_COLOPHON.sh
+++ b/scripts/remove_COLOPHON.sh
@@ -11,6 +11,7 @@
######################################################################
#
# (C) Copyright 2008 & 2013, Michael Kerrisk
+# and (C) Copyright 2022, Alejandro Colomar <alx.manpages@gmail.com>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
@@ -23,6 +24,5 @@
# (http://www.gnu.org/licenses/gpl-2.0.html).
#
#
-for f in "$@"; do
- sed -i '/^\.SH COLOPHON/,$d' "$f"
-done
+find $@ -not -type d \
+|xargs sed -i '/^.SH COLOPHON/,$d';
--
2.30.2