Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
40993173
Commit
40993173
authored
Feb 17, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added start.sh script.
parent
a62b358f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
340 additions
and
0 deletions
+340
-0
bin/start.sh
bin/start.sh
+340
-0
No files found.
bin/start.sh
0 → 100755
View file @
40993173
#!/bin/sh
echo
"******************************************************************"
echo
" HELIOS base"
echo
" Created by Hidehisa Akiyama and Hiroki Shimora"
echo
" Copyright 2000-2007. Hidehisa Akiyama"
echo
" Copyright 2007-2012. Hidehisa Akiyama and Hiroki Shimora"
echo
" All rights reserved."
echo
"******************************************************************"
BINARY_DIR
=
`
dirname
$0
`
CONFIG_DIR
=
$BINARY_DIR
/../config
player
=
"
${
BINARY_DIR
}
/sample_player"
coach
=
"
${
BINARY_DIR
}
/sample_coach"
teamname
=
"HELIOS_base"
host
=
"localhost"
port
=
6000
coach_port
=
""
debug_server_host
=
""
debug_server_port
=
""
player_conf
=
"
${
CONFIG_DIR
}
/player.conf"
config_dir
=
"
${
CONFIG_DIR
}
/formations-dt"
coach_conf
=
"
${
CONFIG_DIR
}
/coach.conf"
team_graphic
=
"--use_team_graphic off"
number
=
11
usecoach
=
"true"
unum
=
0
sleepprog
=
sleep
goaliesleep
=
1
sleeptime
=
0
debugopt
=
""
coachdebug
=
""
offline_logging
=
""
offline_mode
=
""
fullstateopt
=
""
usage
()
{
(
echo
"Usage:
$0
[options]"
echo
"Available options:"
echo
" --help prints this"
echo
" -h, --host HOST specifies server host (default: localhost)"
echo
" -p, --port PORT specifies server port (default: 6000)"
echo
" -P --coach-port PORT specifies server port for online coach (default: 6002)"
echo
" -t, --teamname TEAMNAME specifies team name"
echo
" -n, --number NUMBER specifies the number of players"
echo
" -u, --unum UNUM specifies the uniform number of players"
echo
" -C, --without-coach specifies not to run the coach"
echo
" -f, --formation DIR specifies the formation directory"
echo
" --team-graphic FILE specifies the team graphic xpm file"
echo
" --offline-logging writes offline client log (default: off)"
echo
" --offline-client-mode starts as an offline client (default: off)"
echo
" --debug writes debug log (default: off)"
echo
" --debug-server-connect connects to the debug server (default: off)"
echo
" --debug-server-host HOST specifies debug server host (default: localhost)"
echo
" --debug-server-port PORT specifies debug server port (default: 6032)"
echo
" --debug-server-logging writes debug server log (default: off)"
echo
" --log-dir DIRECTORY specifies debug log directory (default: /tmp)"
echo
" --debug-log-ext EXTENSION specifies debug log file extension (default: .log)"
echo
" --fullstate FULLSTATE_TYPE specifies fullstate model handling"
echo
" FULLSTATE_TYPE is one of [ignore|reference|override]."
)
1>&2
}
while
[
$#
-gt
0
]
do
case
$1
in
--help
)
usage
exit
0
;;
-h
|
--host
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
host
=
"
${
2
}
"
shift
1
;;
-p
|
--port
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
port
=
"
${
2
}
"
shift
1
;;
-P
|
--coach-port
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
coach_port
=
"
${
2
}
"
shift
1
;;
-t
|
--teamname
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
teamname
=
"
${
2
}
"
shift
1
;;
-n
|
--number
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
number
=
"
${
2
}
"
shift
1
;;
-u
|
--unum
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
unum
=
"
${
2
}
"
shift
1
;;
-C
|
--without-coach
)
usecoach
=
"false"
;;
-f
|
--formation
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
config_dir
=
"
${
2
}
"
shift
1
;;
--team-graphic
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
team_graphic
=
"--use_team_graphic on --team_graphic_file
${
2
}
"
shift
1
;;
--offline-logging
)
offline_logging
=
"--offline_logging"
;;
--offline-client-mode
)
offline_mode
=
"on"
;;
--debug
)
debugopt
=
"
${
debugopt
}
--debug"
coachdebug
=
"
${
coachdebug
}
--debug"
;;
--debug-server-connect
)
debugopt
=
"
${
debugopt
}
--debug_server_connect"
;;
--debug-server-host
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
debug_server_host
=
"
${
2
}
"
shift
1
;;
--debug-server-port
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
debug_server_port
=
"
${
2
}
"
shift
1
;;
--debug-server-logging
)
debugopt
=
"
${
debugopt
}
--debug_server_logging"
;;
--log-dir
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
debugopt
=
"
${
debugopt
}
--log_dir
${
2
}
"
shift
1
;;
--debug-log-ext
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
debugopt
=
"
${
debugopt
}
--debug_log_ext
${
2
}
"
shift
1
;;
--fullstate
)
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
fullstate_type
=
"
${
2
}
"
shift
1
case
"
${
fullstate_type
}
"
in
ignore
)
fullstateopt
=
"--use_fullstate false --debug_fullstate false"
;;
reference
)
fullstateopt
=
"--use_fullstate false --debug_fullstate true"
;;
override
)
fullstateopt
=
"--use_fullstate true --debug_fullstate true"
;;
*
)
usage
exit
1
;;
esac
;;
*
)
echo
1>&2
echo
"invalid option
\"
${
1
}
\"
."
1>&2
echo
1>&2
usage
exit
1
;;
esac
shift
1
done
if
[
X
"
${
offline_logging
}
"
!=
X
''
]
;
then
if
[
X
"
${
offline_mode
}
"
!=
X
''
]
;
then
echo
"'--offline-logging' and '--offline-mode' cannot be used simultaneously."
exit
1
fi
fi
if
[
X
"
${
coach_port
}
"
=
X
''
]
;
then
coach_port
=
`
expr
${
port
}
+ 2
`
fi
if
[
X
"
${
debug_server_host
}
"
=
X
''
]
;
then
debug_server_host
=
"
${
host
}
"
fi
if
[
X
"
${
debug_server_port
}
"
=
X
''
]
;
then
debug_server_port
=
`
expr
${
port
}
+ 32
`
fi
opt
=
"--player-config
${
player_conf
}
--config_dir
${
config_dir
}
"
opt
=
"
${
opt
}
-h
${
host
}
-p
${
port
}
-t
${
teamname
}
"
opt
=
"
${
opt
}
${
fullstateopt
}
"
opt
=
"
${
opt
}
--debug_server_host
${
debug_server_host
}
"
opt
=
"
${
opt
}
--debug_server_port
${
debug_server_port
}
"
opt
=
"
${
opt
}
${
offline_logging
}
"
opt
=
"
${
opt
}
${
debugopt
}
"
ping
-c
1
$host
if
[
$number
-gt
0
]
;
then
offline_number
=
""
if
[
X
"
${
offline_mode
}
"
!=
X
''
]
;
then
offline_number
=
"--offline_client_number 1"
if
[
$unum
-eq
0
]
;
then
$player
${
opt
}
-g
${
offline_number
}
&
$sleepprog
$goaliesleep
elif
[
$unum
-eq
1
]
;
then
$player
${
opt
}
-g
${
offline_number
}
&
$sleepprog
$goaliesleep
fi
else
$player
${
opt
}
-g
&
$sleepprog
$goaliesleep
fi
fi
i
=
2
while
[
$i
-le
${
number
}
]
;
do
offline_number
=
""
if
[
X
"
${
offline_mode
}
"
!=
X
''
]
;
then
offline_number
=
"--offline_client_number
${
i
}
"
if
[
$unum
-eq
0
]
;
then
$player
${
opt
}
${
offline_number
}
&
$sleepprog
$sleeptime
elif
[
$unum
-eq
$i
]
;
then
$player
${
opt
}
${
offline_number
}
&
$sleepprog
$sleeptime
fi
else
$player
${
opt
}
&
$sleepprog
$sleeptime
fi
i
=
`
expr
$i
+ 1
`
done
if
[
"
${
usecoach
}
"
=
"true"
]
;
then
coachopt
=
"--coach-config
${
coach_conf
}
"
coachopt
=
"
${
coachopt
}
-h
${
host
}
-p
${
coach_port
}
-t
${
teamname
}
"
coachopt
=
"
${
coachopt
}
${
team_graphic
}
"
coachopt
=
"
${
coachopt
}
--debug_server_host
${
debug_server_host
}
"
coachopt
=
"
${
coachopt
}
--debug_server_port
${
debug_server_port
}
"
coachopt
=
"
${
coachopt
}
${
offline_logging
}
"
coachopt
=
"
${
coachopt
}
${
debugopt
}
"
if
[
X
"
${
offline_mode
}
"
!=
X
''
]
;
then
offline_mode
=
"--offline_client_mode"
if
[
$unum
-eq
0
]
;
then
$coach
${
coachopt
}
${
offline_mode
}
&
elif
[
$unum
-eq
12
]
;
then
$coach
${
coachopt
}
${
offline_mode
}
&
fi
else
$coach
${
coachopt
}
&
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment