net-firewall/shorewall: bash syntax tidy
authorGöktürk Yüksek <gokturk@gentoo.org>
Sat, 21 May 2016 15:57:36 +0000 (11:57 -0400)
committerIan Delaney <idella4@gentoo.org>
Mon, 23 May 2016 11:32:47 +0000 (19:32 +0800)
replace POSIX '[' with the bash '[[' in 5.0.8.2

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1512

Signed-off-by: Ian Delaney <idella4@gentoo.org>
net-firewall/shorewall/shorewall-5.0.8.2.ebuild

index 96d62a21e21adbcce1c7d6d549c5bea5ec44d0a1..afd5706f3cc41c75ac8601d11370be84fe3d4ee0 100644 (file)
@@ -145,7 +145,7 @@ pkg_pretend() {
 }
 
 pkg_setup() {
-       if [ -n "${DIGEST}" ]; then
+       if [[ -n "${DIGEST}" ]]; then
                einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..."
                unset DIGEST
        fi
@@ -291,21 +291,21 @@ src_install() {
                DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed"
                dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt
 
-               if [ -f "${D}etc/logrotate.d/shorewall-init" ]; then
+               if [[ -f "${D}etc/logrotate.d/shorewall-init" ]]; then
                        # On Gentoo, shorewall-init will not create shorewall-ifupdown.log,
                        # so we don't need a logrotate configuration file for shorewall-init
                        einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..."
                        rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed"
                fi
 
-               if [ -d "${D}etc/NetworkManager" ]; then
+               if [[ -d "${D}etc/NetworkManager" ]]; then
                        # On Gentoo, we don't support NetworkManager
                        # so we don't need this folder at all
                        einfo "Removing unused \"${D}etc/NetworkManager\" ..."
                        rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed"
                fi
 
-               if [ -f "${D}usr/share/shorewall-init/ifupdown" ]; then
+               if [[ -f "${D}usr/share/shorewall-init/ifupdown" ]]; then
                        # This script isn't supported on Gentoo
                        rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed"
                fi