OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 2 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE.md file. | 4 # BSD-style license that can be found in the LICENSE.md file. |
5 | 5 |
6 # This program runs the Fletch VM in a virtual terminal controlled by the | 6 # This program runs the Fletch VM in a virtual terminal controlled by the |
7 # program "screen". It then attaches to the VM using the given command-line | 7 # program "screen". It then attaches to the VM using the given command-line |
8 # arguments. Normal usage would be something like: | 8 # arguments. Normal usage would be something like: |
9 # | 9 # |
10 # ./tools/spawn_vm_and_attach.sh out/DebugIA32Clang/fletch in session SESSION_N
AME | 10 # ./tools/spawn_vm_and_attach.sh out/DebugIA32Clang/fletch in session SESSION_N
AME |
11 # | 11 # |
12 # This is a tool that's intended for people building the Fletch VM. If you find | 12 # This is a tool that's intended for people building the Fletch VM. If you find |
(...skipping 21 matching lines...) Expand all Loading... |
34 screen -L -d -m script -t 0 -q -a "${fifo}" "${fletch}-vm" | 34 screen -L -d -m script -t 0 -q -a "${fifo}" "${fletch}-vm" |
35 | 35 |
36 # Wait for the first line of output from the VM | 36 # Wait for the first line of output from the VM |
37 tcp_socket=$(head -1 "${fifo}" | sed 's/^Waiting for compiler on //') | 37 tcp_socket=$(head -1 "${fifo}" | sed 's/^Waiting for compiler on //') |
38 | 38 |
39 # We're done with the FIFO | 39 # We're done with the FIFO |
40 rm "${fifo}" | 40 rm "${fifo}" |
41 | 41 |
42 # Attach to the VM | 42 # Attach to the VM |
43 exec "${fletch}" attach tcp_socket "${tcp_socket}" "$@" | 43 exec "${fletch}" attach tcp_socket "${tcp_socket}" "$@" |
OLD | NEW |