diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-07-18 14:23:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-07-18 14:23:17 +0000 |
commit | 98a9972227c2817f80ca1147c1d555262fb57c96 (patch) | |
tree | 5c939c2ddf42e5e269d314d902f16b9507308321 | |
parent | whitespace (diff) | |
download | gentoo-2-98a9972227c2817f80ca1147c1d555262fb57c96.tar.gz gentoo-2-98a9972227c2817f80ca1147c1d555262fb57c96.tar.bz2 gentoo-2-98a9972227c2817f80ca1147c1d555262fb57c96.zip |
Add a -d (debugger) flag to quickly run dgawk.
-rw-r--r-- | app-portage/eclass-manpages/ChangeLog | 7 | ||||
-rwxr-xr-x | app-portage/eclass-manpages/files/eclass-to-manpage.sh | 12 |
2 files changed, 15 insertions, 4 deletions
diff --git a/app-portage/eclass-manpages/ChangeLog b/app-portage/eclass-manpages/ChangeLog index e1af9fd94b7b..df88ace7a029 100644 --- a/app-portage/eclass-manpages/ChangeLog +++ b/app-portage/eclass-manpages/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-portage/eclass-manpages -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.28 2011/12/08 18:36:36 slyfox Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.29 2012/07/18 14:23:17 vapier Exp $ + + 18 Jul 2012; Mike Frysinger <vapier@gentoo.org> files/eclass-to-manpage.sh: + Add a -d (debugger) flag to quickly run dgawk. 08 Dec 2011; Sergei Trofimovich <slyfox@gentoo.org> eclass-manpages-20100821.ebuild, eclass-manpages-20111014.ebuild: diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh b/app-portage/eclass-manpages/files/eclass-to-manpage.sh index 149d5eeab826..da97e3772735 100755 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.sh +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh @@ -4,10 +4,12 @@ : ${ECLASSDIR:=${0%/*}/../../../eclass} : ${FILESDIR:=${ECLASSDIR}/../app-portage/eclass-manpages/files} +AWK="gawk" while [[ $# -gt 0 ]] ; do case $1 in -e) ECLASSDIR=$2; shift;; -f) FILESDIR=$2; shift;; + -d) AWK="dgawk";; *) break;; esac shift @@ -21,8 +23,14 @@ fi [[ $# -eq 0 ]] && set -- "${ECLASSDIR}"/*.eclass for e in "$@" ; do - gawk \ + set -- \ + ${AWK} \ -vPORTDIR="${PORTDIR}" \ -f "${FILESDIR}"/eclass-to-manpage.awk \ - ${e} > ${e##*/}.5 || rm -f ${e##*/}.5 + ${e} + if [[ ${AWK} == "gawk" ]] ; then + "$@" > ${e##*/}.5 || rm -f ${e##*/}.5 + else + "$@" + fi done |