about summary refs log tree commit diff stats
path: root/docs/setup.sh.txt
blob: f0699ba591fa8681a144189beac4344ef6ec1611 (plain) (blame)
1
2
3
4
5
6
setup.sh is a script that helps automate or more easily set up a dscip
instance. If it is ran without arguments it enters Interactive Mode, where it
will prompt you questions.

However, it can be used with command-line switches in Non-Interactive Mode.
For more info, use the -h switch on setup.sh
color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
fn read-lines in: (addr buffered-file), out: (addr handle array (handle array byte)) {
  var stream: (stream (handle array byte) 0x10)
  var stream-a/edi: (addr stream (handle array byte)) <- address stream
  var line: (stream byte 0x10)
  var line-a/esi: (addr stream byte) <- address line
  {
    clear-stream line-a
    read-line-buffered in, line-a
    var done?/eax: boolean <- stream-empty? line-a
    compare done?, 0  # false
    break-if-!=
#?     print-string 0, "AAA\n"
    var h: (handle array byte)
    var ah/eax: (addr handle array byte) <- address h
    stream-to-array line-a, ah
    write-to-stream stream-a, ah
    loop
  }
  stream-to-array stream-a, out
}