mirror of https://gitlab.com/dabruh/dotfiles.git
Use disposable container.
This commit is contained in:
parent
20aea3157a
commit
6155811b5f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue