Use disposable container.

This commit is contained in:
dabruh 2022-06-05 20:36:15 +02:00
parent 20aea3157a
commit 6155811b5f
1 changed files with 1 additions and 5 deletions

View File

@ -31,11 +31,7 @@ to_code="$(grep "^$to=" "$map" | cut -d '=' -f2)"
echo "$from=$from_code,$to=$to_code" >"$FILE"
translation="$(curl --silent --get \
--data-urlencode "from=$from_code" \
--data-urlencode "to=$to_code" \
--data-urlencode "text=$text" \
"http://localhost:5000/api")"
translation="$(docker run --rm --attach STDOUT --name dmenugtranslate gtranslate:latest gtranslate-query "$from_code" "$to_code" "$text")"
rc=$?
if [ $rc -ne 0 ]; then