pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby Accept none existing directory in REPLACE_RU...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2d564e167058
branches:  trunk
changeset: 547301:2d564e167058
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Sep 15 08:40:55 2008 +0000

description:
Accept none existing directory in REPLACE_RUBY_DIRS.

diffstat:

 lang/ruby/replace.mk |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 317d05e0f3b2 -r 2d564e167058 lang/ruby/replace.mk
--- a/lang/ruby/replace.mk      Mon Sep 15 08:39:10 2008 +0000
+++ b/lang/ruby/replace.mk      Mon Sep 15 08:40:55 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.9 2008/03/17 20:57:04 jlam Exp $
+# $NetBSD: replace.mk,v 1.10 2008/09/15 08:40:55 taca Exp $
 #
 
 .if !defined(_RUBY_REPLACE_MK)
@@ -36,8 +36,15 @@
 _REPLACE_RUBY_FIND_ARGS=\( ${_REPLACE_RUBY_PAT:S/-o//1} \)
 
 replace-ruby-dirs:
-       ${RUN} cd ${WRKSRC} && ${FIND} ${REPLACE_RUBY_DIRS} \
-           -type f ${_REPLACE_RUBY_FIND_ARGS} -print | \
+       ${RUN} cd ${WRKSRC} && \
+           for d in ${REPLACE_RUBY_DIRS}; do \
+               test -d $$d && dirs="$$dirs $$d"; \
+           done; \
+           if [ -z "$$dirs" ]; then \
+               exit 0; \
+           fi; \
+           ${FIND} $$dirs \
+               -type f ${_REPLACE_RUBY_FIND_ARGS} -print | \
            while read f; do \
                ${SED}  -e '1s| *[a-z0-9_/\.-][a-z0-9_/\.-]*/env *||g' \
                        -e '1s| *[a-z0-9_/\.-]*ruby|${RUBY}|' $$f > $$f.tmp; \



Home | Main Index | Thread Index | Old Index