diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-28 05:25:48 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-28 05:25:48 +0000 |
commit | bdb6bf553596918d0d329670dcc8c370d645608e (patch) | |
tree | 9dad38b696949d2366a13f12b1c4d0cb14ac55e5 /utils | |
parent | 3c1dd03fb32d6428e68a30879f7531df99591f03 (diff) | |
download | rockbox-bdb6bf553596918d0d329670dcc8c370d645608e.tar.gz rockbox-bdb6bf553596918d0d329670dcc8c370d645608e.zip |
Add the beggingings of a perl script to run the update over a whole theme zip file... someoene who knows perl please finish this :D
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-rw-r--r-- | utils/skinupdater/skinupdater.c | 21 | ||||
-rwxr-xr-x | utils/skinupdater/updatetheme.pl | 53 |
2 files changed, 74 insertions, 0 deletions
diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c index 982e36a5b7..c354234e27 100644 --- a/utils/skinupdater/skinupdater.c +++ b/utils/skinupdater/skinupdater.c @@ -1,3 +1,24 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: tag_table.c 26346 2010-05-28 02:30:27Z jdgordon $ + * + * Copyright (C) 2010 Jonathan Gordon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + #include <stdio.h> #include <stdlib.h> #include <stdbool.h> diff --git a/utils/skinupdater/updatetheme.pl b/utils/skinupdater/updatetheme.pl new file mode 100755 index 0000000000..a6c3e20097 --- /dev/null +++ b/utils/skinupdater/updatetheme.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id: wpsbuild.pl 24813 2010-02-21 19:10:57Z kugel $ +# + +# usage: updatetheme.pl theme.zip workingdir [options passed to skinupdater] +use File::Basename; + +$numArgs = $#ARGV + 1; + +die "usage: updatetheme.pl theme.zip workingdir [options passed to skinupdater]" if ($numArgs < 2); + +$ARGV[0] =~ /.*\/(.*).(zip|ZIP)/; #fix this regex! +$theme_name = $1; +$tmp = $ARGV[1]; +$outdir = "$tmp/$theme_name"; + +if ($numArgs > 2) +{ + $args = $ARGV[2]; +} else { + $args = ""; +} + + +system("mkdir $outdir") and die "couldnt mkdir $outdir"; + +# step 1, unzip the theme zip +system("unzip $ARGV[0] -d $outdir") and die; + +#for each skin in the zip run skinupdater +@files = `find $outdir -iname "*.wps" -o -iname "*.sbs" -o -iname "*.fms" -o -iname "*.rwps" -o -iname "*.rsbs" -o -iname "*.rfms"`; +`touch $tmp/changes.diff`; +foreach (@files) +{ + chomp($_); + $file = $_; + $out = "$tmp/" . `basename $file`; chomp($out); + `./skinupdater $args $file $out`; + print "$out"; + `diff -u $file $out >> $tmp/changes.diff`; + `mv $out $file`; + # TODO zip up the new folder.. + +} + + +system("rm -Rf $outdir"); |