Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/, /
Date: Sat, 01 Aug 2020 21:41:59
Message-Id: 1596314100.9f540e262f18abdfde67d63a7d87da04abc322c8.whissi@gentoo
1 commit: 9f540e262f18abdfde67d63a7d87da04abc322c8
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 1 13:55:57 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 20:35:00 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9f540e26
7
8 Unify grep usage
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 Makefile | 4 ++--
13 defaults/initrd.scripts | 2 +-
14 defaults/linuxrc | 4 ++--
15 gen_determineargs.sh | 4 ++--
16 gen_funcs.sh | 4 ++--
17 gen_initramfs.sh | 2 +-
18 6 files changed, 10 insertions(+), 10 deletions(-)
19
20 diff --git a/Makefile b/Makefile
21 index e423ab0..92d1278 100644
22 --- a/Makefile
23 +++ b/Makefile
24 @@ -1,4 +1,4 @@
25 -#PACKAGE_VERSION = $(shell /bin/fgrep GK_V= genkernel | sed "s/.*GK_V='\([^']\+\)'/\1/")
26 +#PACKAGE_VERSION = $(shell /bin/grep -F -- GK_V= genkernel | sed "s/.*GK_V='\([^']\+\)'/\1/")
27 PACKAGE_VERSION = $(shell git describe --tags |sed 's,^v,,g')
28 distdir = genkernel-$(PACKAGE_VERSION)
29 MANPAGE = genkernel.8
30 @@ -78,7 +78,7 @@ verify-doc: doc/genkernel.8.txt
31 -e '/ssh-host-keys/s,=\(create\|create-from-host\|runtime\),,g' | \
32 while read opt ; do \
33 regex="^*--(...no-...)?$$opt" ; \
34 - if ! egrep -e "$$regex" $< -sq ; then \
35 + if ! grep -Ee "$$regex" $< -sq ; then \
36 touch faildoc ; \
37 echo "Undocumented option: $$opt" ; \
38 fi ; \
39
40 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
41 index 304d634..22d7e85 100644
42 --- a/defaults/initrd.scripts
43 +++ b/defaults/initrd.scripts
44 @@ -1023,7 +1023,7 @@ run_shell() {
45
46 fs_type_in_use() {
47 fs_type=$1
48 - cut -d ' ' -f 3 < /proc/mounts | fgrep -q "${fs_type}"
49 + cut -d ' ' -f 3 < /proc/mounts | grep -Fq "${fs_type}"
50 }
51
52 mount_devfs() {
53
54 diff --git a/defaults/linuxrc b/defaults/linuxrc
55 index e9e97b6..3ca7e86 100644
56 --- a/defaults/linuxrc
57 +++ b/defaults/linuxrc
58 @@ -1062,7 +1062,7 @@ then
59 bad_msg "Squashfs filesystem could not be mounted, dropping into shell."
60 if [ -e /proc/filesystems ]
61 then
62 - fgrep -q squashfs /proc/filesystems || \
63 + grep -Fq squashfs /proc/filesystems || \
64 bad_msg "HINT: Your kernel does not know filesystem \"squashfs\"."
65 fi
66 run_shell
67 @@ -1279,7 +1279,7 @@ do
68 # and not a mountpoint
69 [ -z "${dev}" ] && continue
70 fstype=$(get_mount_fstype ${fs})
71 - if get_mount_options ${fs} | fgrep -q bind
72 + if get_mount_options ${fs} | grep -Fq bind
73 then
74 opts='bind'
75 dev=${NEW_ROOT}${dev}
76
77 diff --git a/gen_determineargs.sh b/gen_determineargs.sh
78 index d8f3028..75dc151 100755
79 --- a/gen_determineargs.sh
80 +++ b/gen_determineargs.sh
81 @@ -606,7 +606,7 @@ determine_real_args() {
82 vars_to_initialize+=( "BUSYBOX_CONFIG" )
83 vars_to_initialize+=( "DEFAULT_KERNEL_CONFIG" )
84
85 - local binpkgs=( $(compgen -A variable |grep '^GKPKG_.*_BINPKG$') )
86 + local binpkgs=( $(compgen -A variable | grep '^GKPKG_.*_BINPKG$') )
87 local binpkg
88 for binpkg in "${binpkgs[@]}"
89 do
90 @@ -639,7 +639,7 @@ determine_real_args() {
91 declare -gA GKICM_LOOKUP_TABLE_PKG=()
92 local known_initramfs_compression_methods_by_compression=( $(get_initramfs_compression_method_by_compression) )
93 local known_initramfs_compression_methods_by_speed=( $(get_initramfs_compression_method_by_speed) )
94 - local initramfs_compression_methods=( $(compgen -A variable |grep '^GKICM_.*_KOPTNAME$') )
95 + local initramfs_compression_methods=( $(compgen -A variable | grep '^GKICM_.*_KOPTNAME$') )
96 local initramfs_compression_method key var_name var_prefix
97 for initramfs_compression_method in "${initramfs_compression_methods[@]}"
98 do
99
100 diff --git a/gen_funcs.sh b/gen_funcs.sh
101 index f2f075a..0eea8ee 100755
102 --- a/gen_funcs.sh
103 +++ b/gen_funcs.sh
104 @@ -1908,7 +1908,7 @@ check_disk_space_requirements() {
105 }
106
107 check_distfiles() {
108 - local source_files=( $(compgen -A variable |grep '^GKPKG_.*_SRCTAR$') )
109 + local source_files=( $(compgen -A variable | grep '^GKPKG_.*_SRCTAR$') )
110
111 local -a missing_sources
112 local source_file=
113 @@ -2046,7 +2046,7 @@ make_bootdir_writable() {
114 local bootdir_status=unknown
115
116 # Based on mount-boot.eclass code
117 - local fstabstate=$(awk "!/^#|^[[:blank:]]+#|^${BOOTDIR//\//\\/}/ {print \$2}" /etc/fstab 2>/dev/null | egrep "^${BOOTDIR}$" )
118 + local fstabstate=$(awk "!/^#|^[[:blank:]]+#|^${BOOTDIR//\//\\/}/ {print \$2}" /etc/fstab 2>/dev/null | grep -E "^${BOOTDIR}$" )
119 local procstate=$(awk "\$2 ~ /^${BOOTDIR//\//\\/}\$/ {print \$2}" /proc/mounts 2>/dev/null)
120 local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/^${BOOTDIR//\//\\/} .*,ro,/p")
121
122
123 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
124 index e48fa06..c583318 100755
125 --- a/gen_initramfs.sh
126 +++ b/gen_initramfs.sh
127 @@ -37,7 +37,7 @@ copy_binaries() {
128 [[ -e "${binary}" ]] \
129 || gen_die "Binary ${binary} could not be found"
130
131 - if LC_ALL=C "${LDDTREE_COMMAND}" "${binary}" 2>&1 | fgrep -q 'not found'
132 + if LC_ALL=C "${LDDTREE_COMMAND}" "${binary}" 2>&1 | grep -F -q 'not found'
133 then
134 gen_die "Binary ${binary} is linked to missing libraries and may need to be re-built"
135 fi