diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-05-19 19:16:37 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-05-19 19:16:37 +0500 |
| commit | cbd8a0cf8e35b4656fa209ea09007a51e0b6c490 (patch) | |
| tree | f4c06a55e719029e15be8ea8f388de7474b5a6d2 | |
| parent | 3eeb496832ba21d849886df9c2c690e3dd49ed80 (diff) | |
units/dump: Fix dump collecting
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
| -rwxr-xr-x | bot.zsh | 2 | ||||
| -rw-r--r-- | modules/callback.zsh | 4 | ||||
| -rw-r--r-- | modules/commands.zsh | 2 | ||||
| -rw-r--r-- | modules/inline.zsh | 2 | ||||
| -rw-r--r-- | submodules/callback_delete.zsh | 2 | ||||
| -rw-r--r-- | submodules/command_original.zsh | 4 | ||||
| -rw-r--r-- | submodules/command_ping.zsh | 4 | ||||
| -rw-r--r-- | units/dump.zsh | 2 | ||||
| -rw-r--r-- | units/ib_auth.zsh | 6 | ||||
| -rw-r--r-- | units/ib_file.zsh | 2 | ||||
| -rw-r--r-- | units/sn_auth.zsh | 2 | ||||
| -rw-r--r-- | units/sn_get.zsh | 4 | ||||
| -rw-r--r-- | units/sn_search.zsh | 2 |
13 files changed, 19 insertions, 19 deletions
@@ -471,7 +471,7 @@ do fi update="${cache}/${update_id}.json" - dump="${update##*/}" + dump=(${update##*/}) if ! jq -c '.result.[0]' "${cache}/getUpdates.json" > "${update}" then diff --git a/modules/callback.zsh b/modules/callback.zsh index 39bde44..652b3cc 100644 --- a/modules/callback.zsh +++ b/modules/callback.zsh @@ -55,7 +55,7 @@ then fi output_file="${cache}/${update_id}_editMessageText.json" - dump="${dump} ${output_file##*/}" + dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_id=${message_id}" \ @@ -106,7 +106,7 @@ then fi output_file="${cache}/${update_id}_answerCallbackQuery.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "callback_query_id=${query_id}" \ --data-urlencode "text=${notification_text}" \ diff --git a/modules/commands.zsh b/modules/commands.zsh index 3d8cc54..95c16b9 100644 --- a/modules/commands.zsh +++ b/modules/commands.zsh @@ -76,7 +76,7 @@ case "${command}" in esac output_file="${cache}/${update_id}_sendMessage.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_thread_id=${message_thread_id}" \ diff --git a/modules/inline.zsh b/modules/inline.zsh index 56c51e2..eb0a1a1 100644 --- a/modules/inline.zsh +++ b/modules/inline.zsh @@ -51,7 +51,7 @@ case "${command}" in esac output_file="${cache}/${update_id}_answerInlineQuery.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "inline_query_id=${query_id}" \ --data-urlencode "results=${results}" \ diff --git a/submodules/callback_delete.zsh b/submodules/callback_delete.zsh index 91867a9..fb20bb8 100644 --- a/submodules/callback_delete.zsh +++ b/submodules/callback_delete.zsh @@ -6,7 +6,7 @@ chat_id="$(jq -r '.callback_query.message.chat.id' "${update}")" message_id="$(jq -r '.callback_query.message.message_id' "${update}")" output_file="${cache}/${update_id}_deleteMessage.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_id=${message_id}" \ diff --git a/submodules/command_original.zsh b/submodules/command_original.zsh index 4eec34b..f11c2b0 100644 --- a/submodules/command_original.zsh +++ b/submodules/command_original.zsh @@ -29,7 +29,7 @@ then fi output_file="${cache}/${update_id}_sendChatAction.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_thread_id=${message_thread_id}" \ @@ -72,7 +72,7 @@ then fi output_file="${cache}/${update_id}_sendDocument.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_thread_id=${message_thread_id}" \ diff --git a/submodules/command_ping.zsh b/submodules/command_ping.zsh index 8d6497d..913df24 100644 --- a/submodules/command_ping.zsh +++ b/submodules/command_ping.zsh @@ -4,7 +4,7 @@ output_text="Measuring..." output_file="${cache}/${update_id}_sendMessage.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) latency_init="$(strftime %s%N)" @@ -67,7 +67,7 @@ latency=$(((latency_fin - latency_init) / 1000000 - 5)) output_text="$(printf "<b>Latency:</b> %ums" "${latency}")" output_file="${cache}/${update_id}_editMessageText.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "chat_id=${chat_id}" \ --data-urlencode "message_id=${message_id}" \ diff --git a/units/dump.zsh b/units/dump.zsh index 8c857da..300afb9 100644 --- a/units/dump.zsh +++ b/units/dump.zsh @@ -12,7 +12,7 @@ then mkdir -p "${dumps}/${update_id}" fi -for cache_dump in ${dump} +for cache_dump in ${dump[@]} do if [[ -f "${cache}/${cache_dump}" ]] then diff --git a/units/ib_auth.zsh b/units/ib_auth.zsh index 444e746..4db0a49 100644 --- a/units/ib_auth.zsh +++ b/units/ib_auth.zsh @@ -33,7 +33,7 @@ fi case "${ib_board}" in (d) ib_auth_file="${cache}/${update_id}_profile.json" - dump="${dump} ${ib_auth_file##*/}" + dump=(${dump[@]} ${ib_auth_file##*/}) if ! curl --max-time ${external_timeout} \ --output "${ib_auth_file}" \ @@ -110,7 +110,7 @@ case "${ib_board}" in '{"login": $login, "password": $password}')" ib_auth_file="${cache}/${update_id}_token.json" - dump="${dump} ${ib_auth_file##*/}" + dump=(${dump[@]} ${ib_auth_file##*/}) if ! curl --data "${ib_login_data}" \ --header "Content-Type: application/json" \ @@ -158,7 +158,7 @@ case "${ib_board}" in ;; (k|y) ib_auth_file="${cache}/${update_id}_user.json" - dump="${dump} ${ib_auth_file##*/}" + dump=(${dump[@]} ${ib_auth_file##*/}) if ! curl --data-urlencode "username=${ib_login}" \ --data-urlencode "api_key=${ib_key}" \ diff --git a/units/ib_file.zsh b/units/ib_file.zsh index 0dff7fb..730c67b 100644 --- a/units/ib_file.zsh +++ b/units/ib_file.zsh @@ -8,7 +8,7 @@ do done ib_file="${cache}/${ib_hash}.json" -dump="${dump} ${ib_file##*/}" +dump=(${dump[@]} ${ib_file##*/}) if [[ -f "${ib_file}" && "${caching_mode}" != "none" ]] then diff --git a/units/sn_auth.zsh b/units/sn_auth.zsh index e441224..57281e3 100644 --- a/units/sn_auth.zsh +++ b/units/sn_auth.zsh @@ -15,7 +15,7 @@ else fi sn_file="${cache}/${update_id}_search.json" -dump="${dump} ${sn_file##*/}" +dump=(${dump[@]} ${sn_file##*/}) if ! curl --data-urlencode "output_type=2" \ --data-urlencode "api_key=${sn_key}" \ diff --git a/units/sn_get.zsh b/units/sn_get.zsh index d47658a..e180002 100644 --- a/units/sn_get.zsh +++ b/units/sn_get.zsh @@ -18,7 +18,7 @@ then fi output_file="${cache}/${update_id}_getFile.json" -dump="${dump} ${output_file##*/}" +dump=(${dump[@]} ${output_file##*/}) if ! curl --data-urlencode "file_id=${file_id}" \ --get \ @@ -81,7 +81,7 @@ fi if [[ "${api_address}" = "${default_address}" ]] then output_file="${cache}/${update_id}_file.jpg" - dump="${dump} ${output_file##*/}" + dump=(${dump[@]} ${output_file##*/}) if ! curl --max-time ${internal_timeout} \ --output "${output_file}" \ diff --git a/units/sn_search.zsh b/units/sn_search.zsh index 2c6bd45..e6576ef 100644 --- a/units/sn_search.zsh +++ b/units/sn_search.zsh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 sn_file="${cache}/${update_id}_search.json" -dump="${dump} ${sn_file##*/}" +dump=(${dump[@]} ${sn_file##*/}) if ! curl --form "output_type=2" \ --form "api_key=${sn_key}" \ |
