summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-07-02 20:13:46 +0200
committerDavid Seifert <soap@gentoo.org>2022-07-02 20:13:46 +0200
commit5d14b9faaa9e9de64ab85f490fd58580b0311ce2 (patch)
tree43e4f7ded204057f59ef4d7424c60d2fc723f3bb /eclass
parentperl-functions.eclass: remove EAPI 5 (diff)
downloadgentoo-5d14b9faaa9e9de64ab85f490fd58580b0311ce2.tar.gz
gentoo-5d14b9faaa9e9de64ab85f490fd58580b0311ce2.tar.bz2
gentoo-5d14b9faaa9e9de64ab85f490fd58580b0311ce2.zip
perl-functions.eclass: [QA] use bash [[ ... ]] brackets
Closes: https://github.com/gentoo/gentoo/pull/26112 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-functions.eclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index c1b67f54fa75..106394afa15a 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -161,7 +161,7 @@ perl_fix_packlist() {
# remove files that dont exist
cat "${f}" | while read -r entry; do
- if [ ! -e "${D}/${entry}" ]; then
+ if [[ ! -e ${D}/${entry} ]]; then
einfo "Pruning surplus packlist entry ${entry}"
grep -v -x -F "${entry}" "${f}" > "${packlist_temp}"
mv "${packlist_temp}" "${f}"
@@ -276,12 +276,12 @@ perl_check_env() {
for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do
# Next unless match
- [ -v $i ] || continue;
+ [[ -v $i ]] || continue;
# Warn only once, and warn only when one of the bad values are set.
# record failure here.
- if [ ${errored:-0} == 0 ]; then
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then
+ if [[ ${errored:-0} == 0 ]]; then
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then
elog "perl-module.eclass: Suspicious environment values found.";
else
eerror "perl-module.eclass: Suspicious environment values found.";
@@ -293,7 +293,7 @@ perl_check_env() {
value=${!i};
# Print ENV name/value pair
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then
elog " $i=\"$value\"";
else
eerror " $i=\"$value\"";
@@ -301,10 +301,10 @@ perl_check_env() {
done
# Return if there were no failures
- [ ${errored:-0} == 0 ] && return;
+ [[ ${errored:-0} == 0 ]] && return;
# Return if user knows what they're doing
- if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING} ]]; then
elog "Continuing anyway, seems you know what you're doing."
return
fi