You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
354 B
20 lines
354 B
|
|
wait_for_line () {
|
|
while read line
|
|
do
|
|
echo "$line" | grep -q "$1" && break
|
|
echo "$line" | grep "$2" && exit 1
|
|
done < "$3"
|
|
# Read the fifo for ever otherwise process would block
|
|
cat "$3" >/dev/null &
|
|
}
|
|
|
|
function clean_exit(){
|
|
local error_code="$?"
|
|
kill -9 $(jobs -p)
|
|
rm -rf "$1"
|
|
return $error_code
|
|
}
|
|
|
|
|