summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/skinupdater/skinupdater.c21
-rwxr-xr-xutils/skinupdater/updatetheme.pl53
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 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: tag_table.c 26346 2010-05-28 02:30:27Z jdgordon $
9 *
10 * Copyright (C) 2010 Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
1#include <stdio.h> 22#include <stdio.h>
2#include <stdlib.h> 23#include <stdlib.h>
3#include <stdbool.h> 24#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 @@
1#!/usr/bin/perl
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id: wpsbuild.pl 24813 2010-02-21 19:10:57Z kugel $
9#
10
11# usage: updatetheme.pl theme.zip workingdir [options passed to skinupdater]
12use File::Basename;
13
14$numArgs = $#ARGV + 1;
15
16die "usage: updatetheme.pl theme.zip workingdir [options passed to skinupdater]" if ($numArgs < 2);
17
18$ARGV[0] =~ /.*\/(.*).(zip|ZIP)/; #fix this regex!
19$theme_name = $1;
20$tmp = $ARGV[1];
21$outdir = "$tmp/$theme_name";
22
23if ($numArgs > 2)
24{
25 $args = $ARGV[2];
26} else {
27 $args = "";
28}
29
30
31system("mkdir $outdir") and die "couldnt mkdir $outdir";
32
33# step 1, unzip the theme zip
34system("unzip $ARGV[0] -d $outdir") and die;
35
36#for each skin in the zip run skinupdater
37@files = `find $outdir -iname "*.wps" -o -iname "*.sbs" -o -iname "*.fms" -o -iname "*.rwps" -o -iname "*.rsbs" -o -iname "*.rfms"`;
38`touch $tmp/changes.diff`;
39foreach (@files)
40{
41 chomp($_);
42 $file = $_;
43 $out = "$tmp/" . `basename $file`; chomp($out);
44 `./skinupdater $args $file $out`;
45 print "$out";
46 `diff -u $file $out >> $tmp/changes.diff`;
47 `mv $out $file`;
48 # TODO zip up the new folder..
49
50}
51
52
53system("rm -Rf $outdir");