diff options
author | jlam <jlam> | 2007-07-12 19:41:46 +0000 |
---|---|---|
committer | jlam <jlam> | 2007-07-12 19:41:46 +0000 |
commit | 1284ee6e56b1007029648fc8d31744d85422f85a (patch) | |
tree | 65d9ea88d837da23ad3b2a98c4094192d75dc2c4 /mk/pkginstall/shell | |
parent | ee5e03c1b1bac0ecaef8b7afc869d9a5b78cf70b (diff) | |
download | pkgsrc-1284ee6e56b1007029648fc8d31744d85422f85a.tar.gz |
* Add a user-settable variable to tune the default verbosity of the
+INSTALL and +DEINSTALL scripts:
PKGINSTALL_VERBOSE
A list of scriptlets that will be verbose and output a message
noting the actions taken.
* "all" is a special value that implies all of the other items
* "fonts" for +FONTS
* "info-files" for +INFO_FILES
Default value: "all" for PKG_DEVELOPERs, empty otherwise.
* Be "one-liner brief" when doing the default actions. For example,
the info files output now looks like:
gmake-3.81: registering info file /usr/pkg/info/make.info
We retain the current verbosity for the CHECK-* actions.
Diffstat (limited to 'mk/pkginstall/shell')
-rw-r--r-- | mk/pkginstall/shell | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/mk/pkginstall/shell b/mk/pkginstall/shell index 9a99613bb14..b46b07ffdb1 100644 --- a/mk/pkginstall/shell +++ b/mk/pkginstall/shell @@ -1,4 +1,4 @@ -# $NetBSD: shell,v 1.3 2006/07/19 22:26:26 jlam Exp $ +# $NetBSD: shell,v 1.4 2007/07/12 19:41:46 jlam Exp $ # # Generate a +SHELL script that handles shell registration for the package. # @@ -62,7 +62,7 @@ exitcode=0 case $ACTION in ADD) ${SED} -n "/^\# SHELL: /{s/^\# SHELL: //;p;}" ${SELF} | ${SORT} -u | - { while read shell; do + while read shell; do case ${_PKG_REGISTER_SHELLS} in no) continue ;; esac @@ -82,31 +82,18 @@ ADD) ${GREP} "^$shell" $shelldb >/dev/null; then : else - case "$printed_header" in - yes) ;; - *) printed_header=yes - ${ECHO} "===========================================================================" - ${ECHO} "Adding ${PKGNAME} shells to $shelldb:" - ${ECHO} "" - ;; - esac - ${ECHO} " $shell" + ${ECHO} "${PKGNAME}: adding $shell to $shelldb" ${TOUCH} $shelldb ${CP} $shelldb $shelldb.pkgsrc."$$" { ${CAT} $shelldb.pkgsrc."$$"; ${ECHO} "$shell"; } > $shelldb ${RM} $shelldb.pkgsrc."$$" fi done - case "$printed_header" in - yes) ${ECHO} "" - ${ECHO} "===========================================================================" - ;; - esac; } ;; REMOVE) ${SED} -n "/^\# SHELL: /{s/^\# SHELL: //;p;}" ${SELF} | ${SORT} -u | - { while read shell; do + while read shell; do case ${_PKG_REGISTER_SHELLS} in no) continue ;; esac @@ -123,26 +110,13 @@ REMOVE) shelldb="/etc/shells" if ${TEST} -f "$shelldb" && \ ${GREP} "^$shell" $shelldb >/dev/null; then - case "$printed_header" in - yes) ;; - *) printed_header=yes - ${ECHO} "===========================================================================" - ${ECHO} "Removing ${PKGNAME} shells from $shelldb:" - ${ECHO} "" - ;; - esac - ${ECHO} " $shell" + ${ECHO} "${PKGNAME}: removing $shell from $shelldb" ${TOUCH} $shelldb ${CP} $shelldb $shelldb.pkgsrc."$$" { ${GREP} -v "^$shell" $shelldb.pkgsrc."$$" || ${TRUE}; } > $shelldb ${RM} $shelldb.pkgsrc."$$" fi done - case "$printed_header" in - yes) ${ECHO} "" - ${ECHO} "===========================================================================" - ;; - esac; } ;; CHECK-ADD) |