diff options
author | Timo Sirainen <cras@irssi.org> | 2000-07-09 14:02:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-07-09 14:02:56 +0000 |
commit | 08d500519f15e6af421f3596b923205cde3fba97 (patch) | |
tree | 4c23b3da6985af4d904d61a0d3d6589764fd1072 /autogen.sh | |
parent | be643cb48a13f6792af361a890bf3584232faaaa (diff) | |
download | irssi-08d500519f15e6af421f3596b923205cde3fba97.zip |
Create colorless.theme automatically with a perl script in autogen.sh
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@443 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -133,3 +133,18 @@ if test x$NOCONFIGURE = x; then else echo Skipping configure process. fi + +# generate colorless.theme +echo "formats = {" > colorless.theme + +files=`find src -name 'module-formats.c'` +for i in $files; do + file=`echo "$i"|sed 's@^src/@@'` + file=`echo "$file"|sed 's@/module-formats\.c$@@'` + echo " \"$file\" = {" >> colorless.theme + #cat $i | perl -e 'while (<>) { if (/.*".*".*".*"/) { s/^\W*{\W*"([^"]*)",\W*"([^"]*)".*/ \1 = "\2;"/; print $_; } }' >> colorless.theme + cat $i | perl -e 'while (<>) { if (/^\W*{\W*"([^"]*)",\W*"([^"]*)".*/) { $key = $1; $value = $2; $value ~= s/%[krgybmpcwKRGYBMPCW01234567]//g; print(" $key = \"$value\";\n"); } }' >> colorless.theme + echo " };" >> colorless.theme +done + +echo "};" >> colorless.theme |