summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xthesauracles9
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
16hops=3 16hops=3
17 17
18query() { 18query() {
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