blob: a4d6ec9b5ac75626df8688afde8e23e51fe5eb47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/usr/bin/env bash
set -e
this_dir="$(dirname "$0")"
source ${this_dir}/robot.sh
card_no=3
# cram mode doesn't modify the buffer so there is no save prompt
function run_drill_no_save {
sleep_small
for i in `seq 1 ${card_no}`;
do
echo Answer: "$i"
send_answer
done
echo press any key to continue
retn
}
function run_drill {
run_drill_no_save
echo Save file
key y
}
launch_emacs ${this_dir}/cram-run.el
{
find_bot
run_drill
retn
run_drill_no_save
wait_emacs
} || cat robot/failure.txt
|