#!/bin/sh
# Assumes current dir is dir with the file "echo-client.lisp".
# This client just echoes back what the server sent it.
host=localhost
port=1111
umask 077
tmpdir="`mktemp -d -t`" || exit 2
trap 'rm -r -- "$tmpdir"' 0
backpipe="$tmpdir/backward-pipe"
mkfifo "$backpipe"
nc "$host" "$port" < "$backpipe" \
    | lisp -noinit -nositeinit -load "echo-client.lisp" > "$backpipe"
