-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_linux
52 lines (43 loc) · 1.07 KB
/
run_linux
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
#!/bin/bash
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
echo progdir "${progdir}"
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
jarpath=iDebugTool.jar
# Check args.
if [ debug = "$1" ]; then
# add this in for debugging
java_debug=-agentlib:jdwp=transport=dt_socket,server=y,address=8050,suspend=y
shift 1
else
java_debug=
fi
javaCmd="java"
# Mac OS X needs an additional arg, or you get an "illegal thread" complaint.
if [ `uname` = "Darwin" ]; then
os_opts="-XstartOnFirstThread"
else
os_opts=
fi
if [ `uname` = "Linux" ]; then
export GDK_NATIVE_WINDOWS=true
fi
exec "$javaCmd" \
-Xmx256M $os_opts $java_debug \
-Didevicetool.IDeviceTool.bindir="$progdir" \
-classpath "$jarpath" \
idevicetool.IDeviceTool "$@"