]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
scripts/remove_COLOPHON.sh: Allow passing directories to the script
authorAlejandro Colomar <alx.manpages@gmail.com>
Fri, 15 Apr 2022 19:55:13 +0000 (21:55 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 2 May 2022 21:29:23 +0000 (23:29 +0200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
scripts/remove_COLOPHON.sh

index 712106656e1327c0e2e4cf04510e1d7e6f8a9dca..780caab98220171590ee2dfd86b6cda2ca45fa8a 100755 (executable)
@@ -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';