diff options
author | Christian Faulhammer <fauli@gentoo.org> | 2011-12-30 01:10:33 +0000 |
---|---|---|
committer | Christian Faulhammer <fauli@gentoo.org> | 2011-12-30 01:10:33 +0000 |
commit | 53eb97c2d70718dc98963740e9f92060b6a9453e (patch) | |
tree | 3de8a7bff44d1961e522016361c763541a23ae34 /keyword-generation.sh | |
parent | gentoo-syntax: Generating the keyword list automatically (diff) | |
download | ebuild-mode-53eb97c2d70718dc98963740e9f92060b6a9453e.tar.gz ebuild-mode-53eb97c2d70718dc98963740e9f92060b6a9453e.tar.bz2 ebuild-mode-53eb97c2d70718dc98963740e9f92060b6a9453e.zip |
gentoo-syntax: Extend generation script
* filter out obsolete classes
* get some more functions
svn path=/gentoo-syntax/; revision=1698
Diffstat (limited to 'keyword-generation.sh')
-rw-r--r-- | keyword-generation.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/keyword-generation.sh b/keyword-generation.sh index 0be5200..c98ae9a 100644 --- a/keyword-generation.sh +++ b/keyword-generation.sh @@ -9,11 +9,18 @@ # Generate a raw list for app-emacs/gentoo-syntax TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)" +ECLASSES=$(cd $(portageq portdir)/eclass/;ls *.eclass) +for filter in git.eclass +do + ECLASSES=${ECLASSES//${filter}/} +done + +echo Output in ${TMPFILE} -for i in *.eclass +for eclass in ${ECLASSES} do - echo '(defvar ebuild-mode-keywords-'${i//.eclass/} >>${TMPFILE} - echo -n \'\(\($(grep '^[a-Z_-]*()' $i|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE} + echo '(defvar ebuild-mode-keywords-'${eclass//.eclass/} >>${TMPFILE} + echo -n \'\(\($(grep '^[a-Z_-.]*()' $(portageq portdir)/eclass/${eclass}|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE} echo >>${TMPFILE} echo font-lock-type-face\)\)>>${TMPFILE} echo >>${TMPFILE} |