Oi,Wtf: remount on statewait failure
This commit is contained in:
parent
98f0a5b28e
commit
aecd2b658d
|
|
@ -85,9 +85,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for agent to finish, then print response
|
# Wait for agent to finish, then print response
|
||||||
while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done
|
waitstate() { cat "$NAV_PATH/statewait" 2>/dev/null || { ollie-remount && cat "$NAV_PATH/statewait"; } || die "mount lost"; }
|
||||||
while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done
|
while [ "$(waitstate)" = "idle" ]; do :; done
|
||||||
|
while [ "$(waitstate)" != "idle" ]; do :; done
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
offset=$(cat "$NAV_PATH/offset")
|
offset=$(try cat "$NAV_PATH/offset") || die "cannot read offset"
|
||||||
tail -c +$((offset + 1)) "$NAV_PATH/chat"
|
try tail -c +$((offset + 1)) "$NAV_PATH/chat"
|
||||||
printf '\n%s\n' "$NAV_NAME"
|
printf '\n%s\n' "$NAV_NAME"
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,9 @@ fi
|
||||||
printf '%b' "$context\n\nWhat does this code do?" | try tee "$NAV_PATH/prompt" >/dev/null
|
printf '%b' "$context\n\nWhat does this code do?" | try tee "$NAV_PATH/prompt" >/dev/null
|
||||||
|
|
||||||
# Wait for agent to finish, then print response
|
# Wait for agent to finish, then print response
|
||||||
while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done
|
waitstate() { cat "$NAV_PATH/statewait" 2>/dev/null || { ollie-remount && cat "$NAV_PATH/statewait"; } || die "mount lost"; }
|
||||||
while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done
|
while [ "$(waitstate)" = "idle" ]; do :; done
|
||||||
|
while [ "$(waitstate)" != "idle" ]; do :; done
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
offset=$(cat "$NAV_PATH/offset")
|
offset=$(cat "$NAV_PATH/offset")
|
||||||
tail -c +$((offset + 1)) "$NAV_PATH/chat"
|
tail -c +$((offset + 1)) "$NAV_PATH/chat"
|
||||||
|
|
|
||||||
Reference in New Issue