From 450bc33de335b67a9ea402faa2395d2e5b10a4a1 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Wed, 4 May 2022 22:11:42 +0200 Subject: [PATCH] R-packages.eclass: use bash style tests Signed-off-by: Alessandro Barbieri --- eclass/R-packages.eclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index 1412ba802c..0be59a20ca 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -36,7 +36,7 @@ BDEPEND="sys-apps/pkgcore" # @DESCRIPTION: # will contain symlinks to everything in _movelink() { - if [ -e "${1}" ]; then + if [[ -e "${1}" ]]; then local rp1="$(realpath ${1})" || die mv "${rp1}" "${2}" || die cp -rsf "${2}" "${rp1}" || die @@ -110,11 +110,11 @@ R-packages_src_install() { docompress -x "${DOCS_DIR}/${i}" done - if [ -e html ]; then + if [[ -e html ]]; then _movelink html "${ED}${DOCS_DIR}/html" || die docompress -x "${DOCS_DIR}/html" fi - if [ -e doc ]; then + if [[ -e doc ]]; then pushd doc || die for i in * ; do _movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die @@ -122,7 +122,7 @@ R-packages_src_install() { done popd || die fi - if [ -e doc/html ]; then + if [[ -e doc/html ]]; then docompress -x "${DOCS_DIR}/html" fi docompress -x "${DOCS_DIR}" @@ -137,10 +137,10 @@ R-packages_src_install() { # @DESCRIPTION: # function that will prompt to install the suggested packages if they exist R-packages_pkg_postinst() { - if [ -v SUGGESTED_PACKAGES ]; then + if [[ -v SUGGESTED_PACKAGES ]]; then for p in ${SUGGESTED_PACKAGES} ; do pexist=$(pquery -n1 "${p}" 2>/dev/null) || die - if [ -n "${pexist}" ]; then + if [[ -n "${pexist}" ]]; then optfeature "having the upstream suggested package" "${p}" fi done