#!/bin/sh # Like jack_connect, but retry until the connection succeeds. # Adam Sampson echo -n "Connecting $1 to $2..." while $waiting; do jack_connect "$1" "$2" 2>/dev/null from="" if jack_lsp -c | awk '/^ / { print from " " $1 } /^[^ ]/ { from=$1 }' | grep -q "$1 $2"; then echo " done" exit 0 fi sleep 1 echo -n "." done