Gentoo Archives: gentoo-commits

From: Haelwenn Monnier <contact@×××××××××.me>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: eclass/
Date: Thu, 05 May 2022 14:42:32
Message-Id: 1651735937.f16593b366ff0061d602f4dc792a2e2a26006733.lanodan@gentoo
1 commit: f16593b366ff0061d602f4dc792a2e2a26006733
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Wed May 4 20:12:03 2022 +0000
4 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
5 CommitDate: Thu May 5 07:32:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f16593b3
7
8 octaveforge.eclass: use bash style tests
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 eclass/octaveforge.eclass | 14 +++++++-------
13 1 file changed, 7 insertions(+), 7 deletions(-)
14
15 diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass
16 index b9303884c..590f21a1c 100644
17 --- a/eclass/octaveforge.eclass
18 +++ b/eclass/octaveforge.eclass
19 @@ -58,7 +58,7 @@ SLOT="0"
20 # function to unpack and set the correct S
21 octaveforge_src_unpack() {
22 default
23 - if [ ! -d "${WORKDIR}/${P}" ]; then
24 + if [[ ! -d "${WORKDIR}/${P}" ]]; then
25 S="${WORKDIR}/${PN}"
26 pushd "${S}" || die
27 fi
28 @@ -76,12 +76,12 @@ octaveforge_src_prepare() {
29 sed -i 's|octave_config_info|__octave_config_info__|g' Makefile || die
30
31 chmod 0755 "${S}/configure" || die
32 - if [ -e "${S}/src/autogen.sh" ]; then
33 + if [[ -e "${S}/src/autogen.sh" ]]; then
34 pushd "${S}/src" || die
35 ./autogen.sh || die 'failed to run autogen.sh'
36 popd || die
37 fi
38 - if [ -e "${S}/src/Makefile" ]; then
39 + if [[ -e "${S}/src/Makefile" ]]; then
40 sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.'
41 fi
42 eapply_user
43 @@ -93,7 +93,7 @@ octaveforge_src_prepare() {
44 # documentation to docsdir
45 octaveforge_src_install() {
46 emake DESTDIR="${D}" DISTPKG='Gentoo' install
47 - if [ -d doc/ ]; then
48 + if [[ -d doc/ ]]; then
49 dodoc -r doc/*
50 fi
51 }
52 @@ -103,7 +103,7 @@ octaveforge_src_install() {
53 # function that will rebuild the octave package database
54 octaveforge_pkg_postinst() {
55 einfo "Registering ${CATEGORY}/${PF} on the Octave package database."
56 - if [ ! -d "${OCT_PKGDIR}" ] ; then
57 + if [[ ! -d "${OCT_PKGDIR}" ]] ; then
58 mkdir -p "${OCT_PKGDIR}" || die
59 fi
60 "${OCT_BIN}" -H -q --no-site-file --eval "pkg('rebuild');" &> /dev/null || die 'failed to register the package.'
61 @@ -122,7 +122,7 @@ octaveforge_pkg_prerm() {
62 "
63 )
64 rm -f "${pkgdir}/packinfo/on_uninstall.m" || die
65 - if [ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]; then
66 + if [[ -e "${pkgdir}/packinfo/on_uninstall.m.orig" ]]; then
67 mv "$pkgdir"/packinfo/on_uninstall.m{.orig,} || die
68 cd "$pkgdir/packinfo" || die
69 "${OCT_BIN}" -H -q --no-site-file --eval "
70 @@ -137,7 +137,7 @@ octaveforge_pkg_prerm() {
71 # function that will rebuild the octave package database
72 octaveforge_pkg_postrm() {
73 einfo 'Rebuilding the Octave package database.'
74 - if [ ! -d "${OCT_PKGDIR}" ] ; then
75 + if [[ ! -d "${OCT_PKGDIR}" ]] ; then
76 mkdir -p "${OCT_PKGDIR}" || die
77 fi
78 "${OCT_BIN}" -H --silent --eval 'pkg rebuild' &> /dev/null || die 'failed to rebuild the package database'