projects
/
org.ibex.nanogoat.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initial checkin
[org.ibex.nanogoat.git]
/
upstream
/
mips
/
scripts
/
htojava.sh
1
#!/bin/sh
2
[ -n "$1" ] || exit 1
3
[ -n "${1%.*}" ] && echo "package ${1%.*};"
4
echo "public interface ${1##*.} {"
5
sed -n '
6
s/[[:space:]][[:space:]]*/ /g;
7
s/^ *# *define \([A-Z_][A-Za-z0-9_]*\) \([0-9][0-9]*\)/ public static final int \1 = \2;/p'
8
echo "}";