public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/shlib/
Date: Wed, 26 Jun 2013 17:29:24 +0000 (UTC)	[thread overview]
Message-ID: <1372267205.411585260d9f58b4b088c4ec816eb417a6c5877b.dywi@gentoo> (raw)
Message-ID: <20130626172924.tcmqzK2wGQTjuzFczrIqI0OtbDdomxv9Q_9XffUPdcc@z> (raw)

commit:     411585260d9f58b4b088c4ec816eb417a6c5877b
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jun 26 17:20:05 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jun 26 17:20:05 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=41158526

files/shlib/functions.sh: make $SHLIB PATH-like

$SHLIB is now a colon-separated list of directories where function files could
be found.

---
 files/shlib/functions.sh | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/files/shlib/functions.sh b/files/shlib/functions.sh
index 05df7fa..03eb28b 100644
--- a/files/shlib/functions.sh
+++ b/files/shlib/functions.sh
@@ -204,10 +204,23 @@ autodie() {
 load_functions() {
    [ -n "${SHLIB-}" ] || die "\$SHLIB is not set."
    local f
+   local sdir
+   local IFS="${IFS_DEFAULT}"
    while [ $# -gt 0 ]; do
-      f="${SHLIB}/${1%.sh}.sh"
-      veinfo "Trying to load functions file ${f} ... "
-      . "${f}" || die "failed to load functions file ${f}."
+      f=
+      IFS=":"
+      for sdir in ${SHLIB}; do
+         IFS="${IFS_DEFAULT}"
+         f="${sdir}/${1%.sh}.sh"
+         if [ -f "${f}" ]; then
+            veinfo "Trying to load functions file ${f} ... "
+            . "${f}" || die "failed to load functions file ${f}."
+            break 1
+         else
+            f=
+         fi
+      done
+      [ -n "${f}" ] || die "failed to locate functions file '${1}'."
       shift
    done
    return 0


             reply	other threads:[~2013-06-26 17:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 15:58 André Erdmann [this message]
2013-06-26 17:29 ` [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/shlib/ André Erdmann
  -- strict thread matches above, loose matches on Subject: below --
2013-11-14 18:24 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-09-23 12:34 André Erdmann
2013-09-23 12:34 André Erdmann
2013-09-06 17:27 André Erdmann
2013-09-06 10:22 André Erdmann
2013-09-04 12:50 André Erdmann
2013-09-04 12:50 André Erdmann
2013-09-04 12:50 André Erdmann
2013-09-04 10:16 André Erdmann
2013-08-05 11:44 André Erdmann
2013-06-30 15:58 André Erdmann
2013-06-22 15:24 André Erdmann

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=1372267205.411585260d9f58b4b088c4ec816eb417a6c5877b.dywi@gentoo \
    --to=dywi@mailerd.de \
    --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