mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
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
This commit is contained in:
parent
be643cb48a
commit
08d500519f
2 changed files with 15 additions and 116 deletions
15
autogen.sh
15
autogen.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue