aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-05-04 22:12:03 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-05-05 09:32:17 +0200
commitf16593b366ff0061d602f4dc792a2e2a26006733 (patch)
treeb9dd6687e24381f59d7d16c6264134ab62a1249b /eclass
parentR-packages.eclass: use bash style tests (diff)
downloadguru-f16593b366ff0061d602f4dc792a2e2a26006733.tar.gz
guru-f16593b366ff0061d602f4dc792a2e2a26006733.tar.bz2
guru-f16593b366ff0061d602f4dc792a2e2a26006733.zip
octaveforge.eclass: use bash style tests
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/octaveforge.eclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
index b9303884c..590f21a1c 100644
--- a/eclass/octaveforge.eclass
+++ b/eclass/octaveforge.eclass
@@ -58,7 +58,7 @@ SLOT="0"
# function to unpack and set the correct S
octaveforge_src_unpack() {
default
- if [ ! -d "${WORKDIR}/${P}" ]; then
+ if [[ ! -d "${WORKDIR}/${P}" ]]; then
S="${WORKDIR}/${PN}"
pushd "${S}" || die
fi
@@ -76,12 +76,12 @@ octaveforge_src_prepare() {
sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
chmod 0755 "${S}/configure" || die
- if [ -e "${S}/src/autogen.sh" ]; then
+ if [[ -e "${S}/src/autogen.sh" ]]; then
pushd "${S}/src" || die
./autogen.sh || die 'failed to run autogen.sh'
popd || die
fi
- if [ -e "${S}/src/Makefile" ]; then
+ if [[ -e "${S}/src/Makefile" ]]; then
sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
fi
eapply_user
@@ -93,7 +93,7 @@ octaveforge_src_prepare() {
# documentation to docsdir
octaveforge_src_install() {
emake DESTDIR="${D}" DISTPKG='Gentoo' install
- if [ -d doc/ ]; then
+ if [[ -d doc/ ]]; then
dodoc -r doc/*
fi
}
@@ -103,7 +103,7 @@ octaveforge_src_install() {
# function that will rebuild the octave package database
octaveforge_pkg_postinst() {
einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
- if [ ! -d "${OCT_PKGDIR}" ] ; then
+ if [[ ! -d "${OCT_PKGDIR}" ]] ; then
mkdir -p "${OCT_PKGDIR}" || die
fi
"${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
@@ -122,7 +122,7 @@ octaveforge_pkg_prerm() {
"
)
rm -f "${pkgdir}/packinfo/on_uninstall.m" || die
- if [ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]; then
+ if [[ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
mv "$pkgdir"/packinfo/on_uninstall.m{.orig,} || die
cd "$pkgdir/packinfo" || die
"${OCT_BIN}" -H -q --no-site-file --eval "
@@ -137,7 +137,7 @@ octaveforge_pkg_prerm() {
# function that will rebuild the octave package database
octaveforge_pkg_postrm() {
einfo 'Rebuilding the Octave package database.'
- if [ ! -d "${OCT_PKGDIR}" ] ; then
+ if [[ ! -d "${OCT_PKGDIR}" ]] ; then
mkdir -p "${OCT_PKGDIR}" || die
fi
"${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'