From: "Ulrich Mueller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/emacs-tools:gentoo-syntax commit in: /
Date: Sat, 22 Sep 2012 17:34:44 +0000 (UTC) [thread overview]
Message-ID: <1348332935.a71c56294c70a7300c1744de3b9e787ee3d7334a.ulm@gentoo> (raw)
commit: a71c56294c70a7300c1744de3b9e787ee3d7334a
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 22 15:20:42 2012 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 22 16:55:35 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=a71c5629
Update keyword-generation.sh.
* keyword-generation.sh: Drop dead or removed eclasses from
obsolete list. Sort it alphabetically. Skip any eclass that is
marked with a @DEAD token.
(has): New function.
(ECLASSDIR, OBSOLETE): New variables.
---
ChangeLog | 8 ++++++++
keyword-generation.sh | 28 +++++++++++++++++-----------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c494e6b..01e4472 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-22 Ulrich Müller <ulm@gentoo.org>
+
+ * keyword-generation.sh: Drop dead or removed eclasses from
+ obsolete list. Sort it alphabetically. Skip any eclass that is
+ marked with a @DEAD token.
+ (has): New function.
+ (ECLASSDIR, OBSOLETE): New variables.
+
2012-04-10 Ulrich Müller <ulm@gentoo.org>
* gentoo-syntax.texi: Small syntax fixes.
diff --git a/keyword-generation.sh b/keyword-generation.sh
index 180db5c..920a7e6 100644
--- a/keyword-generation.sh
+++ b/keyword-generation.sh
@@ -8,23 +8,29 @@
# Generate a raw list for app-emacs/gentoo-syntax
TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)"
-ECLASSES=$(cd $(portageq portdir)/eclass/;ls *.eclass)
-
+ECLASSDIR="$(portageq portdir)/eclass"
+ECLASSES=$(cd ${ECLASSDIR}; ls *.eclass)
# Obsolete eclasses or ones which contain no functions
-for filter in git bash-completion gems ruby qt4 php-ext-pecl-r1 \
- php-ext-source-r1 gnome.org gnustep-2 java-mvn-src kde4-meta-pkg \
- leechcraft mythtv obs-download tetex tetex-3
-do
- ECLASSES=${ECLASSES//${filter}.eclass/}
-done
+OBSOLETE="bash-completion gems git gnome.org gnustep-2 java-mvn-src \
+ kde4-meta-pkg leechcraft mythtv obs-download qt4 ruby"
+
+has() {
+ local needle=$1 item
+ shift
+ for item in "$@"; do
+ [[ ${item} = ${needle} ]] && return 0
+ done
+ return 1
+}
echo Output in ${TMPFILE}
echo Manual parsing of mercurial.eclass needed! Do not forget!
-for eclass in ${ECLASSES}
-do
+for eclass in ${ECLASSES}; do
+ has ${eclass%.eclass} ${OBSOLETE} && continue
+ grep -q "^# @DEAD$" "${ECLASSDIR}/${eclass}" && continue
echo '(defvar ebuild-mode-keywords-'${eclass//.eclass/} >>${TMPFILE}
- echo -n \'\(\($(LC_ALL=C grep '^[A-Za-z0-9._-]*()' $(portageq portdir)/eclass/${eclass}|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE}
+ echo -n \'\(\($(LC_ALL=C grep '^[A-Za-z0-9._-]*()' "${ECLASSDIR}/${eclass}"|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE}
echo >>${TMPFILE}
echo font-lock-type-face\)\)>>${TMPFILE}
echo >>${TMPFILE}
next reply other threads:[~2012-09-22 17:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 17:34 Ulrich Mueller [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-04 19:21 [gentoo-commits] proj/emacs-tools:gentoo-syntax commit in: / Ulrich Mueller
2013-03-09 7:42 Ulrich Mueller
2013-03-09 7:42 Ulrich Mueller
2013-03-09 7:42 Ulrich Mueller
2013-03-09 7:42 Ulrich Mueller
2013-01-13 21:15 Ulrich Mueller
2013-01-13 21:15 Ulrich Mueller
2012-09-22 22:47 Ulrich Mueller
2012-09-22 21:26 Ulrich Mueller
2012-09-22 21:26 Ulrich Mueller
2012-09-22 20:48 Ulrich Mueller
2012-09-22 17:34 Ulrich Mueller
2012-09-22 17:34 Ulrich Mueller
2012-09-22 17:34 Ulrich Mueller
2012-06-09 13:10 Ulrich Mueller
2012-05-06 18:47 Ulrich Mueller
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
2012-05-06 16:06 Sebastian Pipping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348332935.a71c56294c70a7300c1744de3b9e787ee3d7334a.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox