diff options
-rwxr-xr-x | thesauracles | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/thesauracles b/thesauracles index 3891d18..aafa3c8 100755 --- a/thesauracles +++ b/thesauracles | |||
@@ -16,9 +16,12 @@ wf=/tmp/thesauracles | |||
16 | hops=3 | 16 | hops=3 |
17 | 17 | ||
18 | query() { | 18 | query() { |
19 | response="$(mktemp /tmp/thesauracles.XXXXXX)" | 19 | response="/tmp/$1.thesauracles" |
20 | trap "rm -f $response" KILL | 20 | if [ ! -f "$response" ]; then |
21 | curl "dict://$dict_server/d:$1:$dict_database" >"$response" 2>/dev/null | 21 | curl "dict://$dict_server/d:$1:$dict_database" >"$response" 2>/dev/null |
22 | else | ||
23 | sleep 0.3 | ||
24 | fi | ||
22 | if grep -q 552 "$response"; then | 25 | if grep -q 552 "$response"; then |
23 | return 1 | 26 | return 1 |
24 | fi | 27 | fi |