Ned Ludd wrote:
#!/bin/sh
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

if [ -d /etc/portage/postsync.d/ ]; then
        for f in /etc/portage/postsync.d/* ; do
                if [ -x ${f} ] ; then
                        ${f}
                fi
        done
else
        :
fi
##############################

How do you think we should handle it?

I'd prefer this way:

----
#!/bin/sh
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

if [ -f /etc/portage/bashrc ]; then
        source /etc/portage/bashrc
        [ "$(type -t post_sync)" == "function" ] && post_sync
fi
----

i.e. use bashrc for this. We handle the existing hooks through bashrc, and postsync hooks aren't anything different, so they should be handled through the same logic. I think it's just more intuitive than a postsync.d/ subdirectory.

--
Kind Regards,

Simon Stelling
Gentoo/AMD64 Developer
--
[email protected] mailing list

Reply via email to