summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-15 10:45:44 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-15 11:12:55 +0100
commita4c4394579b56009954e476af1ba3f5fa1ad58d8 (patch)
treec28139f5929c82588d2393893062bef4fbae0470 /media-gfx/xsane
parentgames-server/mtavc: Use relative symlinks (diff)
downloadgentoo-a4c4394579b56009954e476af1ba3f5fa1ad58d8.tar.gz
gentoo-a4c4394579b56009954e476af1ba3f5fa1ad58d8.tar.bz2
gentoo-a4c4394579b56009954e476af1ba3f5fa1ad58d8.zip
media-gfx/xsane: Use relative symlink, fix ugly shell code
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'media-gfx/xsane')
-rw-r--r--media-gfx/xsane/xsane-0.999-r3.ebuild10
1 files changed, 5 insertions, 5 deletions
diff --git a/media-gfx/xsane/xsane-0.999-r3.ebuild b/media-gfx/xsane/xsane-0.999-r3.ebuild
index 21fc69c48587..08d3756194f8 100644
--- a/media-gfx/xsane/xsane-0.999-r3.ebuild
+++ b/media-gfx/xsane/xsane-0.999-r3.ebuild
@@ -76,14 +76,14 @@ src_install() {
# link xsane so it is seen as a plugin in gimp
if use gimp; then
local plugindir
- local gimptool=$(ls "${EPREFIX}"/usr/bin/gimptool* | head -n1)
- if [ -n "${gimptool}" ]; then
- plugindir="$(${gimptool} --gimpplugindir)/plug-ins"
+ local gimptool=( "${EPREFIX}"/usr/bin/gimptool* )
+ if [[ ${#gimptool[@]} -gt 0 ]]; then
+ plugindir="$("${gimptool[0]}" --gimpplugindir)/plug-ins"
else
die "Can't find GIMP plugin directory."
fi
- dodir "${plugindir#${EPREFIX}}"
- dosym "${EPREFIX}/usr/bin/xsane" "${plugindir#${EPREFIX}}"/xsane
+ mkdir -p "${D}${plugindir}" || die
+ ln -s ../../../../bin/xsane "${D}${plugindir}"/xsane || die
fi
newicon "${DISTDIR}/${PN}-256x256.png" "${PN}".png