1 |
Author: fauli |
2 |
Date: 2011-12-30 00:53:12 +0000 (Fri, 30 Dec 2011) |
3 |
New Revision: 1697 |
4 |
|
5 |
Added: |
6 |
gentoo-syntax/keyword-generation.sh |
7 |
Log: |
8 |
gentoo-syntax: Generating the keyword list automatically |
9 |
|
10 |
|
11 |
Added: gentoo-syntax/keyword-generation.sh |
12 |
=================================================================== |
13 |
--- gentoo-syntax/keyword-generation.sh (rev 0) |
14 |
+++ gentoo-syntax/keyword-generation.sh 2011-12-30 00:53:12 UTC (rev 1697) |
15 |
@@ -0,0 +1,20 @@ |
16 |
+#!/bin/bash |
17 |
+# Copyright 2011 Gentoo Foundation |
18 |
+# Distributed under the terms of the GNU General Public License v2 or later |
19 |
+# $Id: $ |
20 |
+ |
21 |
+# Authors: |
22 |
+# Christian Faulhammer <fauli@g.o> |
23 |
+# |
24 |
+# Generate a raw list for app-emacs/gentoo-syntax |
25 |
+ |
26 |
+TMPFILE="$(mktemp ${TMPDIR:-/tmp}/keyword-generation.XXXXXX)" |
27 |
+ |
28 |
+for i in *.eclass |
29 |
+do |
30 |
+ echo '(defvar ebuild-mode-keywords-'${i//.eclass/} >>${TMPFILE} |
31 |
+ echo -n \'\(\($(grep '^[a-Z_-]*()' $i|sed -e 's:\(^.*\)().*:"\1":g')\)>>${TMPFILE} |
32 |
+ echo >>${TMPFILE} |
33 |
+ echo font-lock-type-face\)\)>>${TMPFILE} |
34 |
+ echo >>${TMPFILE} |
35 |
+done |