#!/bin/bash
# stub for alr_ssh: records the script, prints the next canned output
T="$(cd "$(dirname "$0")/.." && pwd)"
n=$(ls $T/scripts | wc -l); n=$((n+1)); f=$(printf '%s/scripts/%03d.sh' $T $n)
echo "# ARGS: $*" > $f; cat >> $f
q=$(ls $T/q 2>/dev/null | head -1)
if [ -n "$q" ]; then cat "$T/q/$q"; rm -f "$T/q/$q"; else echo "STUB_NO_OUTPUT=1"; fi
exit 0
