summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/action_helper.pl
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
commitcf87597226f5d6b269f1f2c4d6f402aa1eccb852 (patch)
tree4ba1f3ae53b3bd9cae0e2c6c4dd57836b43a5ece /apps/plugins/lua/action_helper.pl
parentc483efadc63eaed35b5fb5e4e02c2282daf32470 (diff)
downloadrockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.gz
rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.zip
Commit FS#9174: Lua scripting language by Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/action_helper.pl')
-rwxr-xr-xapps/plugins/lua/action_helper.pl40
1 files changed, 40 insertions, 0 deletions
diff --git a/apps/plugins/lua/action_helper.pl b/apps/plugins/lua/action_helper.pl
new file mode 100755
index 0000000000..fdf45798b5
--- /dev/null
+++ b/apps/plugins/lua/action_helper.pl
@@ -0,0 +1,40 @@
1#!/usr/bin/env perl
2############################################################################
3# __________ __ ___.
4# Open \______ \ ____ ____ | | _\_ |__ _______ ___
5# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8# \/ \/ \/ \/ \/
9# $Id$
10#
11# Copyright (C) 2009 by Maurus Cuelenaere
12#
13# All files in this archive are subject to the GNU General Public License.
14# See the file COPYING in the source tree root for full license agreement.
15#
16# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17# KIND, either express or implied.
18#
19############################################################################
20
21$input = "../../action.h";
22
23open(ACTION, "<$input") or die "Can't open $input!";
24
25print "rb.actions = {\n";
26
27$i = 0;
28while(my $line = <ACTION>)
29{
30 chomp($line);
31 if($line =~ /^\s*(ACTION_[^\s]+)(\s*=.*)?,$/)
32 {
33 printf "\t%s = %d,\n", $1, $i;
34 $i++;
35 }
36}
37
38print "}\n";
39
40close(ACTION);