1 |
Ned Ludd wrote: |
2 |
> #!/bin/sh |
3 |
> # Copyright 2006 Gentoo Foundation |
4 |
> # Distributed under the terms of the GNU General Public License v2 |
5 |
> # $Header: $ |
6 |
> |
7 |
> if [ -d /etc/portage/postsync.d/ ]; then |
8 |
> for f in /etc/portage/postsync.d/* ; do |
9 |
> if [ -x ${f} ] ; then |
10 |
> ${f} |
11 |
> fi |
12 |
> done |
13 |
> else |
14 |
> : |
15 |
> fi |
16 |
> ############################## |
17 |
> |
18 |
> How do you think we should handle it? |
19 |
|
20 |
I'd prefer this way: |
21 |
|
22 |
---- |
23 |
#!/bin/sh |
24 |
# Copyright 2006 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
# $Header: $ |
27 |
|
28 |
if [ -f /etc/portage/bashrc ]; then |
29 |
source /etc/portage/bashrc |
30 |
[ "$(type -t post_sync)" == "function" ] && post_sync |
31 |
fi |
32 |
---- |
33 |
|
34 |
i.e. use bashrc for this. We handle the existing hooks through bashrc, |
35 |
and postsync hooks aren't anything different, so they should be handled |
36 |
through the same logic. I think it's just more intuitive than a |
37 |
postsync.d/ subdirectory. |
38 |
|
39 |
-- |
40 |
Kind Regards, |
41 |
|
42 |
Simon Stelling |
43 |
Gentoo/AMD64 Developer |
44 |
-- |
45 |
gentoo-portage-dev@g.o mailing list |