sys-apps/openrc: Replace path_exists with inline bash test
authorMichał Górny <mgorny@gentoo.org>
Thu, 9 Aug 2018 14:16:07 +0000 (16:16 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 15 Aug 2018 07:30:54 +0000 (09:30 +0200)
path_exists was really meant to be used with wildcards (i.e. when plain
bash tests can't work easily).  Here it is really unnecessary.

sys-apps/openrc/openrc-0.34.11.ebuild

index 4e2ed59e45f43618167c6f5e0819cacd4275f3cd..7fd281798c14b92990e812984d6a157abcfe0f2f 100644 (file)
@@ -289,7 +289,7 @@ pkg_postinst() {
        fi
 
        # Handle the conf.d/local.{start,stop} -> local.d transition
-       if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+       if [[ -f ${EROOT}etc/conf.d/local.start || -f ${EROOT}etc/conf.d/local.stop ]] ; then
                elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
                elog "files to ${EROOT}etc/local.d"
                mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start