1 |
Author: fauli |
2 |
Date: 2011-12-30 01:10:33 +0000 (Fri, 30 Dec 2011) |
3 |
New Revision: 1698 |
4 |
|
5 |
Modified: |
6 |
gentoo-syntax/keyword-generation.sh |
7 |
Log: |
8 |
gentoo-syntax: Extend generation script |
9 |
* filter out obsolete classes |
10 |
* get some more functions |
11 |
|
12 |
|
13 |
Modified: gentoo-syntax/keyword-generation.sh |
14 |
=================================================================== |
15 |
--- gentoo-syntax/keyword-generation.sh 2011-12-30 00:53:12 UTC (rev 1697) |
16 |
+++ gentoo-syntax/keyword-generation.sh 2011-12-30 01:10:33 UTC (rev 1698) |
17 |
@@ -9,11 +9,18 @@ |
18 |
# Generate a raw list for app-emacs/gentoo-syntax |
19 |
|
20 |
TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)" |
21 |
+ECLASSES=$(cd $(portageq portdir)/eclass/;ls *.eclass) |
22 |
+for filter in git.eclass |
23 |
+do |
24 |
+ ECLASSES=${ECLASSES//${filter}/} |
25 |
+done |
26 |
|
27 |
-for i in *.eclass |
28 |
+echo Output in ${TMPFILE} |
29 |
+ |
30 |
+for eclass in ${ECLASSES} |
31 |
do |
32 |
- echo '(defvar ebuild-mode-keywords-'${i//.eclass/} >>${TMPFILE} |
33 |
- echo -n \'\(\($(grep '^[a-Z_-]*()' $i|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE} |
34 |
+ echo '(defvar ebuild-mode-keywords-'${eclass//.eclass/} >>${TMPFILE} |
35 |
+ echo -n \'\(\($(grep '^[a-Z_-.]*()' $(portageq portdir)/eclass/${eclass}|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE} |
36 |
echo >>${TMPFILE} |
37 |
echo font-lock-type-face\)\)>>${TMPFILE} |
38 |
echo >>${TMPFILE} |