From 414fb4ed633d56933807ddcc785cde7c1a772dca Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 14 Nov 2005 13:52:31 +0000 Subject: xameius ipod WPS and my first take at a script that generates a .cfg file for the WPS. This is only a first step. There are lots of more things to do. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7856 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps/wpsbuild.pl | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 apps/wps/wpsbuild.pl (limited to 'apps/wps/wpsbuild.pl') diff --git a/apps/wps/wpsbuild.pl b/apps/wps/wpsbuild.pl new file mode 100755 index 0000000000..2eb76c6b06 --- /dev/null +++ b/apps/wps/wpsbuild.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +my $wpslist=$ARGV[0]; + +if(!$wpslist) { + print "Usage: wpsbuilds.pl [WPSLIST]\n"; + exit; +} + +sub buildcfg { + my $cfg = $wps; + + $cfg =~ s/\.wps/.cfg/; + + open(CFG, ">$cfg"); + + print CFG <) { + my $l = $_; + if($l =~ /^ *\#/) { + # skip comment + next; + } + if($l =~ /^ */i) { + $within = 1; + next; + } + if($within) { + if($l =~ /^ *<\/wps>/i) { + buildcfg(); + $within = 0; + } + elsif($l =~ /^Name: (.*)/i) { + $wps = $1; + } + elsif($l =~ /^Font: (.*)/i) { + $font = $1; + } + elsif($l =~ /^Statusbar: (.*)/i) { + $statusbar = $1; + } + } +} + -- cgit v1.2.3