1 #!/usr/bin/expect -f |
1 #!/usr/bin/expect -f |
2 #====================================================================== |
2 #====================================================================== |
3 # E N D L A D C P 1 |
3 # E N D L A D C P 1 |
4 # doc: Wed Mar 10 22:23:52 2004 |
4 # doc: Wed Mar 10 22:23:52 2004 |
5 # dlm: Wed Nov 19 15:13:10 2008 |
5 # dlm: Thu Aug 26 19:48:00 2010 |
6 # (c) 2004 A.M. Thurnherr |
6 # (c) 2004 A.M. Thurnherr |
7 # uE-Info: 28 14 NIL 0 0 72 2 2 8 NIL ofnI |
7 # uE-Info: 20 56 NIL 0 0 72 2 2 8 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # HISTORY: |
10 # HISTORY: |
11 # Apr 4, 2004: - adapted from [endladcp2] |
11 # Apr 4, 2004: - adapted from [endladcp2] |
12 # Jun 18, 2004: - BUG: could not handle station 008 (illegal octal digit) |
12 # Jun 18, 2004: - BUG: could not handle station 008 (illegal octal digit) |
13 # Jan 25, 2005: - BUG: bbabble could not be in relative path (on MacOSX) |
13 # Jan 25, 2005: - BUG: bbabble could not be in relative path (on MacOSX) |
14 # Feb 14, 2006: - BUG: log files were written to bin dir |
14 # Feb 14, 2006: - BUG: log files were written to bin dir |
15 # Oct 4, 2006: - adapted to older expect version |
15 # Oct 4, 2006: - adapted to older expect version |
16 # Oct 28, 2006: - allowed for lrb downcasing filenames |
16 # Oct 28, 2006: - allowed for lrb downcasing filenames |
17 # Nov 19, 2008: - added version |
17 # Nov 19, 2008: - added version |
|
18 # Aug 25, 2010: - DEFAULTS.expect -> CRUISE_SETUP.expect |
|
19 # - libBB.expect -> libRDI.expect |
|
20 # Aug 26, 2010: - added support for ymodem_download_cmd |
18 |
21 |
19 #---------------------------------------------------------------------- |
22 #---------------------------------------------------------------------- |
20 # Setup |
23 # Setup |
21 #---------------------------------------------------------------------- |
24 #---------------------------------------------------------------------- |
22 |
25 |
23 log_user 0; |
26 log_user 0; |
24 source DEFAULTS.expect; |
27 source CRUISE_SETUP.expect; |
25 regsub {dir1} [exec which dir1] {libBB.expect} path; |
28 regsub {dir1} [exec which dir1] {libRDI.expect} path; |
26 source $path; |
29 source $path; |
27 |
30 |
28 print_version; |
31 print_version; |
29 |
32 |
30 if ![file isdirectory $raw_dir] { |
33 if ![file isdirectory $raw_dir] { |
82 #---------------------------------------------------------------------- |
85 #---------------------------------------------------------------------- |
83 |
86 |
84 regsub {.*/} $argv0 {} basename; |
87 regsub {.*/} $argv0 {} basename; |
85 start_logging [format %s_%s.log $basename $stnstr]; |
88 start_logging [format %s_%s.log $basename $stnstr]; |
86 |
89 |
87 spawn $bbabble -ms $tty0; |
90 spawn $bbabble -msy $ymodem_receive_cmd $tty0; |
88 wait_for_startup; |
91 wait_for_startup; |
89 |
92 |
90 send_user "\nSaving hardware configuration..."; |
93 send_user "\nSaving hardware configuration..."; |
91 save_hardware_config [format %s000.LOG $deployment_name]; |
94 save_hardware_config [format %s000.LOG $deployment_name]; |
92 resume_logging [format %s_%s.log $basename $stnstr]; |
95 resume_logging [format %s_%s.log $basename $stnstr]; |