summaryrefslogtreecommitdiffstats
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 @@
+/***************************************************************************
+ * __________ __ ___.
+ * 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");