summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-22 07:28:46 +0000
committerSam James <sam@gentoo.org>2023-03-22 07:35:31 +0000
commit1925c2fe931db9c7b05e222170cf57c96e398dbc (patch)
tree1c64236a588693758c3c254113c5bbe4ab70b826 /dev-ml/findlib
parentdev-ml/findlib: workaround collision with labltk (diff)
downloadgentoo-1925c2fe931db9c7b05e222170cf57c96e398dbc.tar.gz
gentoo-1925c2fe931db9c7b05e222170cf57c96e398dbc.tar.bz2
gentoo-1925c2fe931db9c7b05e222170cf57c96e398dbc.zip
dev-ml/findlib: cleanup check_stublibs
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml/findlib')
-rw-r--r--dev-ml/findlib/findlib-1.9.5.ebuild14
-rw-r--r--dev-ml/findlib/findlib-1.9.6.ebuild14
2 files changed, 12 insertions, 16 deletions
diff --git a/dev-ml/findlib/findlib-1.9.5.ebuild b/dev-ml/findlib/findlib-1.9.5.ebuild
index 701736ea9f4a..47f06adbaf23 100644
--- a/dev-ml/findlib/findlib-1.9.5.ebuild
+++ b/dev-ml/findlib/findlib-1.9.5.ebuild
@@ -58,18 +58,16 @@ src_install() {
}
check_stublibs() {
- local ocaml_stdlib=`ocamlc -where`
+ local ocaml_stdlib=$(ocamlc -where)
local ldconf="${ocaml_stdlib}/ld.conf"
- if [ ! -e ${ldconf} ]
- then
- echo "${ocaml_stdlib}" > ${ldconf}
- echo "${ocaml_stdlib}/stublibs" >> ${ldconf}
+ if [[ ! -e ${ldconf} ]] ; then
+ echo "${ocaml_stdlib}" > ${ldconf} || die
+ echo "${ocaml_stdlib}/stublibs" >> ${ldconf} || die
fi
- if [ -z `grep -e ${stublibs} ${ldconf}` ]
- then
- echo ${stublibs} >> ${ldconf}
+ if ! grep -qe ${stublibs} ${ldconf} ; then
+ echo ${stublibs} >> ${ldconf} || die
fi
}
diff --git a/dev-ml/findlib/findlib-1.9.6.ebuild b/dev-ml/findlib/findlib-1.9.6.ebuild
index b2e309f4791b..235bfbea3c71 100644
--- a/dev-ml/findlib/findlib-1.9.6.ebuild
+++ b/dev-ml/findlib/findlib-1.9.6.ebuild
@@ -58,18 +58,16 @@ src_install() {
}
check_stublibs() {
- local ocaml_stdlib=`ocamlc -where`
+ local ocaml_stdlib=$(ocamlc -where)
local ldconf="${ocaml_stdlib}/ld.conf"
- if [ ! -e ${ldconf} ]
- then
- echo "${ocaml_stdlib}" > ${ldconf}
- echo "${ocaml_stdlib}/stublibs" >> ${ldconf}
+ if [[ ! -e ${ldconf} ]] ; then
+ echo "${ocaml_stdlib}" > ${ldconf} || die
+ echo "${ocaml_stdlib}/stublibs" >> ${ldconf} || die
fi
- if [ -z `grep -e ${stublibs} ${ldconf}` ]
- then
- echo ${stublibs} >> ${ldconf}
+ if ! grep -qe ${stublibs} ${ldconf} ; then
+ echo ${stublibs} >> ${ldconf} || die
fi
}