-
Notifications
You must be signed in to change notification settings - Fork 0
/
renode
executable file
·54 lines (45 loc) · 957 Bytes
/
renode
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
#!/bin/bash
set -e
set -u
# this is to support running Renode from external directory
ROOT_PATH="`dirname \"\`realpath "$0"\`\"`"
. "$ROOT_PATH/tools/common.sh"
OUTPUT_PATH="$ROOT_PATH/output/bin"
TARGET="Release"
QUIET=false
PARAMS=()
for ARG in "$@"
do
if [ "$ARG" == "-d" ]
then
TARGET="Debug"
if $ON_LINUX
then
LAUNCHER="$LAUNCHER --debug"
fi
elif [ "$ARG" == "-q" ]
then
QUIET=true
else
PARAMS+=("$ARG")
fi
done
if ! $ON_WINDOWS
then
verify_mono_version
fi
if ${REMOTE:-false}
then
LAUNCHER="$LAUNCHER --debugger-agent=transport=dt_socket,address=0.0.0.0:${REMOTE_PORT:=9876},server=y"
echo "Waiting for a debugger at port $REMOTE_PORT..."
fi
if ${QUIET:-false}
then
exec 2>/dev/null
fi
if $ON_WINDOWS
then
"${OUTPUT_PATH}/${TARGET}/Renode.exe" "${PARAMS[@]:-}"
else
$LAUNCHER "${OUTPUT_PATH}/${TARGET}/Renode.exe" "${PARAMS[@]:-}"
fi