From 6155811b5f40772a5b2ff5140268cf71f5416c71 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Sun, 5 Jun 2022 20:36:15 +0200 Subject: [PATCH] Use disposable container. --- .local/bin/dmenugtranslate | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.local/bin/dmenugtranslate b/.local/bin/dmenugtranslate index eb31b20..2728658 100755 --- a/.local/bin/dmenugtranslate +++ b/.local/bin/dmenugtranslate @@ -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