summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-04-15 21:55:13 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-02 23:29:23 +0200
commit0299c88b6435f6fca5a516b488628ac3ff09a0e5 (patch)
tree1fcee4ede7720a7e28ea7bba264f471d115bedac /scripts
parent17bb9b18f20361e3db64b672156f693ab722dc47 (diff)
scripts/remove_COLOPHON.sh: Allow passing directories to the script
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/remove_COLOPHON.sh6
1 files 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';