summaryrefslogtreecommitdiff
path: root/jni/ruby/tool/build-transcode
diff options
context:
space:
mode:
Diffstat (limited to 'jni/ruby/tool/build-transcode')
-rwxr-xr-xjni/ruby/tool/build-transcode16
1 files changed, 16 insertions, 0 deletions
diff --git a/jni/ruby/tool/build-transcode b/jni/ruby/tool/build-transcode
new file mode 100755
index 0000000..fa71155
--- /dev/null
+++ b/jni/ruby/tool/build-transcode
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ "$1" -a -d "$1" ] && { cd "$1" || exit $?; } && shift
+[ "$#" = 0 ] && set enc/trans/*.trans
+for src; do
+ case "$src" in
+ *.trans)
+ c="`dirname $src`/`basename $src .trans`.c"
+ ${BASERUBY-ruby} tool/transcode-tblgen.rb -vo "$c" "$src"
+ ;;
+ *)
+ echo "$0: don't know how to deal with $src"
+ continue
+ ;;
+ esac
+done