summaryrefslogtreecommitdiff
path: root/sh/gendepends.sh.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-03 10:33:42 +0000
committerRoy Marples <roy@marples.name>2008-03-03 10:33:42 +0000
commit0aedc0286040b595119b4523d38ffd35b0018d6c (patch)
tree32ab5aca002067f07bbc45fcd34a3fd769c73468 /sh/gendepends.sh.in
parent5971d14afd7e67b088307cd589f84491e99625ed (diff)
downloadopenrc-0aedc0286040b595119b4523d38ffd35b0018d6c.tar.gz
openrc-0aedc0286040b595119b4523d38ffd35b0018d6c.tar.bz2
openrc-0aedc0286040b595119b4523d38ffd35b0018d6c.tar.xz
Introduce LOCAL_PREFIX for a user maintained script location.
Diffstat (limited to 'sh/gendepends.sh.in')
-rw-r--r--sh/gendepends.sh.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index fad7665..2beba64 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -31,8 +31,21 @@ depend() {
:
}
-for _dir in @PREFIX@/etc/init.d @PKG_PREFIX@/etc/init.d; do
+_done_dirs=
+for _dir in \
+@PREFIX@/etc/init.d \
+@PKG_PREFIX@/etc/init.d \
+@LOCAL_PREFIX@/etc/init.d
+do
[ -d "${_dir}" ] || continue
+
+ # Don't do the same dir twice
+ for _d in ${_done_dirs}; do
+ [ "${_d}" = "${_dir}" ] && continue 2
+ done
+ unset _d
+ _done_dirs="${_done_dirs} ${_dir}"
+
cd "${_dir}"
for SVCNAME in *; do
[ -x "${SVCNAME}" ] || continue