forked from dmzgroup/lmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfacegen
executable file
·65 lines (40 loc) · 1.22 KB
/
interfacegen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
START_DIR=`pwd`
while [ "`pwd`" != "/" -a "$SRC_LOCATION" = "" ] ; do
if [ -d ./lmkproject -a -d ./src ] ; then
SRC_LOCATION=`pwd`/src
else
cd ..
fi
done
if [ "$LMK_HOME" = "" ] ; then
if [ "$SRC_LOCATION" = "" ] ; then
if [ -d "$HOME/cm/src/lmk" ] ; then
LMK_HOME=$HOME/cm/src/lmk
else
echo "Unable to locate interfacegen. Please set the LMK_HOME environment variable if it is not installed in a default location."
exit -1
fi
else
LMK_HOME=$SRC_LOCATION/lmk
fi
fi
cd $START_DIR
if [ -d $LMK_HOME/bin/`uname` ] ; then
export LMK_BIN_HOME=$LMK_HOME/bin/`uname` ;
elif [ `uname -o` = "Cygwin" ] ; then
# NOTE: cygpath converts the path from Unix to Win32 format so that lua.exe can
# understand it.
export LMK_HOME=`cygpath -w $LMK_HOME`
export LMK_BIN_HOME=$LMK_HOME/bin/win32 ;
fi
export LUA_PATH="$LMK_HOME/scripts/?.lua;$LMK_HOME/scripts/src/?.lua;;"
if [ "$LMK_BIN_HOME" = "" ] ; then
echo LMK_BIN_HOME not found ;
exit -1;
fi
if [ "$LMK_LUA" = "" ] ; then
export LMK_LUA=$LMK_BIN_HOME/lua ;
fi
echo $LMK_LUA $LMK_HOME/scripts/interfacegen.lua $* ;
"$LMK_LUA" $LMK_HOME/scripts/interfacegen.lua $* ;