summaryrefslogtreecommitdiff
path: root/eclass/fixheadtails.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /eclass/fixheadtails.eclass
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'eclass/fixheadtails.eclass')
-rw-r--r--eclass/fixheadtails.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/fixheadtails.eclass b/eclass/fixheadtails.eclass
index 475b182843a5..f1df8242b6fd 100644
--- a/eclass/fixheadtails.eclass
+++ b/eclass/fixheadtails.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: fixheadtails.eclass
@@ -8,6 +8,12 @@
# Original author John Mylchreest <johnm@gentoo.org>
# @BLURB: functions to replace obsolete head/tail with POSIX compliant ones
+# @FUNCTION: _do_sed_fix
+# @INTERNAL
+# @USAGE: <file>
+# @DESCRIPTION:
+# Apply series of regular expressions via sed to file
+# to make head/tail compliant
_do_sed_fix() {
einfo " - fixed $1"
sed -i \
@@ -37,5 +43,5 @@ ht_fix_all() {
MATCHES=$(grep -l -s -i -R -e "head -[ 0-9]" -e "tail [+-][ 0-9]" * | sort -u)
[[ -n ${MATCHES} ]] \
&& ht_fix_file ${MATCHES} \
- || einfo "No need for ht_fix_all anymore !"
+ || einfo "No need for ht_fix_all anymore!"
}