1 |
commit: 5d14b9faaa9e9de64ab85f490fd58580b0311ce2 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 2 18:13:46 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 18:13:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d14b9fa |
7 |
|
8 |
perl-functions.eclass: [QA] use bash [[ ... ]] brackets |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/26112 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
eclass/perl-functions.eclass | 14 +++++++------- |
14 |
1 file changed, 7 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass |
17 |
index c1b67f54fa75..106394afa15a 100644 |
18 |
--- a/eclass/perl-functions.eclass |
19 |
+++ b/eclass/perl-functions.eclass |
20 |
@@ -161,7 +161,7 @@ perl_fix_packlist() { |
21 |
|
22 |
# remove files that dont exist |
23 |
cat "${f}" | while read -r entry; do |
24 |
- if [ ! -e "${D}/${entry}" ]; then |
25 |
+ if [[ ! -e ${D}/${entry} ]]; then |
26 |
einfo "Pruning surplus packlist entry ${entry}" |
27 |
grep -v -x -F "${entry}" "${f}" > "${packlist_temp}" |
28 |
mv "${packlist_temp}" "${f}" |
29 |
@@ -276,12 +276,12 @@ perl_check_env() { |
30 |
|
31 |
for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do |
32 |
# Next unless match |
33 |
- [ -v $i ] || continue; |
34 |
+ [[ -v $i ]] || continue; |
35 |
|
36 |
# Warn only once, and warn only when one of the bad values are set. |
37 |
# record failure here. |
38 |
- if [ ${errored:-0} == 0 ]; then |
39 |
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then |
40 |
+ if [[ ${errored:-0} == 0 ]]; then |
41 |
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
42 |
elog "perl-module.eclass: Suspicious environment values found."; |
43 |
else |
44 |
eerror "perl-module.eclass: Suspicious environment values found."; |
45 |
@@ -293,7 +293,7 @@ perl_check_env() { |
46 |
value=${!i}; |
47 |
|
48 |
# Print ENV name/value pair |
49 |
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then |
50 |
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
51 |
elog " $i=\"$value\""; |
52 |
else |
53 |
eerror " $i=\"$value\""; |
54 |
@@ -301,10 +301,10 @@ perl_check_env() { |
55 |
done |
56 |
|
57 |
# Return if there were no failures |
58 |
- [ ${errored:-0} == 0 ] && return; |
59 |
+ [[ ${errored:-0} == 0 ]] && return; |
60 |
|
61 |
# Return if user knows what they're doing |
62 |
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then |
63 |
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
64 |
elog "Continuing anyway, seems you know what you're doing." |
65 |
return |
66 |
fi |