public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Legler" <a3li@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/ruby-scripts:master commit in: eselect-ruby/
Date: Wed, 14 Aug 2013 12:04:55 +0000 (UTC)	[thread overview]
Message-ID: <1376480879.b01f1a87e61421abba2ecba3c8e0336a2b5f7044.a3li@gentoo> (raw)

commit:     b01f1a87e61421abba2ecba3c8e0336a2b5f7044
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Wed Aug 14 11:47:59 2013 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Wed Aug 14 11:47:59 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/ruby-scripts.git;a=commit;h=b01f1a87

ruby.eselect: Rework manpage handling

Ruby >= 1.9 has erb, irb, and ri manpages in addition to the ruby.1,
support these.

Also, set links compression-agnostically (does that word even exist?),
fixing bug 480004.

---
 eselect-ruby/ruby.eselect | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/eselect-ruby/ruby.eselect b/eselect-ruby/ruby.eselect
index ad4fa7c..34063a8 100644
--- a/eselect-ruby/ruby.eselect
+++ b/eselect-ruby/ruby.eselect
@@ -42,21 +42,20 @@ check_target() {
 
 remove_symlinks() {
 	rm -f ${EROOT}${bindir}/{ruby,gem,irb,erb,ri,rdoc,testrb} && \
-	rm -f ${EROOT}${man1dir}/ruby.{1,1.gz,1.bz2,1.lzma}
+	rm -f ${EROOT}${man1dir}/{ruby,irb,erb,ri}.1*
 }
 
-create_man_symlinks() {
+create_man_links() {
 	local version=${1}
 
-	for m in ${EROOT}${man1dir}/ruby${version}.{1,1.gz,1.bz2,1.lzma}
-	do
-		if [[ -e ${m} ]] ; then
-			break
-		fi
+	for manpage in "ruby" "irb" "erb" "ri" ; do
+		for m in ${EROOT}${man1dir}/${manpage}${version}.1* ; do
+			if [[ -e ${m} ]]; then
+				echo ".so ${manpage}${version}.1" > ${EROOT}${man1dir}/${manpage}.1 || \
+					write_error_msg "Could not set up manpage link for ${manpage}.1"
+			fi
+		done
 	done
-
-	ln -s "${m}" "${m/ruby${version}/ruby}" || \
-		write_error_msg "Could not set man symlink"
 }
 
 create_symlinks() {
@@ -82,7 +81,7 @@ create_symlinks() {
 		echo
 	fi
 
-	[[ $(portageq envvar FEATURES) =~ noman ]] || create_man_symlinks ${version}
+	[[ $(portageq envvar FEATURES) =~ noman ]] || create_man_links ${version}
 
 	write_list_start "Successfully switched to profile:"
 	write_kv_list_entry "${target}" ""


             reply	other threads:[~2013-08-14 12:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 12:04 Alex Legler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-25  5:41 [gentoo-commits] proj/ruby-scripts:master commit in: eselect-ruby/ Hans de Graaff
2023-12-26  8:24 Hans de Graaff
2023-10-08  8:39 Hans de Graaff
2023-08-13  6:41 Hans de Graaff
2023-08-13  6:41 Hans de Graaff
2023-04-09  7:37 Hans de Graaff
2022-03-13  7:11 Hans de Graaff
2020-12-25  8:01 Hans de Graaff
2019-12-22  9:05 Hans de Graaff
2019-01-21 18:36 Hans de Graaff
2018-12-25  6:28 Hans de Graaff
2017-12-25  7:33 Hans de Graaff
2017-12-25  7:33 Hans de Graaff
2017-07-23  7:46 Hans de Graaff
2017-07-23  7:46 Hans de Graaff
2017-07-23  7:46 Hans de Graaff
2016-12-26 16:38 Hans de Graaff
2015-12-29 10:56 Hans de Graaff
2015-12-29 10:39 Hans de Graaff
2014-12-27 19:07 Manuel Rüger
2013-12-27  7:35 Alex Legler
2013-08-14 12:04 Alex Legler
2013-08-14 12:04 Alex Legler
2013-08-14 12:04 Alex Legler
2012-01-05 21:47 Alex Legler
2011-03-06 15:28 Alex Legler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376480879.b01f1a87e61421abba2ecba3c8e0336a2b5f7044.a3li@gentoo \
    --to=a3li@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox