summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-10-30 23:56:05 -0400
committerFranklin Wei <franklin@rockbox.org>2019-11-05 19:39:45 -0500
commit4d633bb6b86f6942a37d62e8209cf65159864ce1 (patch)
treeb7801d7774b221fada62b4de7c5f4aa1442c5c15
parent1ea74dc42b36929508e76c7059802285d8d418c8 (diff)
downloadrockbox-4d633bb6b8.tar.gz
rockbox-4d633bb6b8.tar.bz2
rockbox-4d633bb6b8.zip
Add some scripts to automate target listing and generating build-info
This adds tools/list_targets.pl and tools/build-info.pl. list_targets does exactly what it sounds like - it lists targets by target status. build-info automates the generation of build-info.release for new releases. Change-Id: I4c859fdeb54c8cc645832a7c4192f9d18590031e
-rwxr-xr-xtools/build-info.pl28
-rwxr-xr-xtools/list_targets.pl27
2 files changed, 55 insertions, 0 deletions
diff --git a/tools/build-info.pl b/tools/build-info.pl
new file mode 100755
index 0000000000..157e29fb1b
--- /dev/null
+++ b/tools/build-info.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+#
+# Generate the build-info.release file found on download.rockbox.org
+
+require "./builds.pm";
+
+print "[release]\n";
+
+foreach my $b (&stablebuilds) {
+ if(exists($builds{$b}{release})) {
+ print "$b=$builds{$b}{release}\n";
+ }
+ else {
+ print "$b=$publicrelease\n";
+ }
+}
+
+print "[status]\n";
+
+foreach my $b (&allbuilds) {
+ print "$b=$builds{$b}{status}\n";
+}
diff --git a/tools/list_targets.pl b/tools/list_targets.pl
new file mode 100755
index 0000000000..039c14f0db
--- /dev/null
+++ b/tools/list_targets.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+#
+# List all targets in builds.pm, categorized by target status.
+
+require "./builds.pm";
+
+print "Stable:\n";
+
+for my $b (&stablebuilds) {
+ print $builds{$b}{name} , "\n";
+}
+
+print "Unstable:\n";
+for my $b (&usablebuilds) {
+ print $builds{$b}{name} , "\n";
+}
+
+print "Unusable:\n";
+for my $b (&allbuilds) {
+ print $builds{$b}{name} , "\n" if($builds{$b}{status} == 1);
+}