diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-12-27 14:43:27 +0300 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-12-27 14:43:27 +0300 |
| commit | 8fa25a02014197ca02bf2c4ba02ec18027de46e1 (patch) | |
| tree | 1b3ecbc003a9fa4ea4713848b879a5a807831514 | |
| parent | 226c6d7590f1e9dfc24b82271af015e3549c8668 (diff) | |
*/*: Use source instead of dot
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
46 files changed, 214 insertions, 214 deletions
diff --git a/auth/donmai.zsh b/auth/donmai.zsh index e957fd8..2f2e500 100644 --- a/auth/donmai.zsh +++ b/auth/donmai.zsh @@ -19,7 +19,7 @@ then output_text="Failed to access ${ib_name} API" log_text="ib_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -29,7 +29,7 @@ then output_text="An unknown error occurred" log_text="ib_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi diff --git a/auth/moebooru.zsh b/auth/moebooru.zsh index 1c3d573..f23f887 100644 --- a/auth/moebooru.zsh +++ b/auth/moebooru.zsh @@ -20,7 +20,7 @@ then output_text="Failed to access ${ib_name} API" log_text="ib_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi diff --git a/auth/sankakucomplex.zsh b/auth/sankakucomplex.zsh index 3eabc78..000b4ef 100644 --- a/auth/sankakucomplex.zsh +++ b/auth/sankakucomplex.zsh @@ -27,7 +27,7 @@ then output_text="Failed to access ${ib_name} API" log_text="ib_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -37,7 +37,7 @@ then output_text="An unknown error occurred" log_text="ib_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -415,20 +415,20 @@ alias htmlescape="sed -e 's/</\</g' -e 's/>/\>/g'" alias urlencode="jq -Rr @uri" log_text="PID: ${$}" -. "${units}/log.zsh" +source "${units}/log.zsh" log_text="CWD: $(pwd)" -. "${units}/log.zsh" +source "${units}/log.zsh" log_text="Creating directories..." -. "${units}/log.zsh" +source "${units}/log.zsh" rm -fr "${cache}" mkdir -p "${cache}" mkdir -p "${users}" log_text="Retrieving bot information..." -. "${units}/log.zsh" +source "${units}/log.zsh" if ! input_data="$( curl --connect-timeout ${connrefused_timeout} \ @@ -444,7 +444,7 @@ if ! input_data="$( )" then log_text="getMe: Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -452,7 +452,7 @@ fi if ! jq -e '.' <<< "${input_data}" > /dev/null then log_text="getMe: An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -468,29 +468,29 @@ then log_text="getMe: An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi username="$(jq -r '.result.username' <<< "${input_data}")" log_text="Bot: ${username}" -. "${units}/log.zsh" +source "${units}/log.zsh" log_text="Running files age check..." -. "${units}/log.zsh" +source "${units}/log.zsh" for file in aliases blacklist donate help whitelist do log_text="files/${file}.txt" - . "${units}/log.zsh" + source "${units}/log.zsh" if [[ -f "${files}/${file}.txt" ]] then if [[ "${files}/${file}.txt" -ot "${files}/${file}.txt.default" ]] then log_text="Warning: File ${file}.txt is older than ${file}.txt.default" - . "${units}/log.zsh" + source "${units}/log.zsh" fi else < "${files}/${file}.txt.default" > "${files}/${file}.txt" @@ -498,37 +498,37 @@ do done log_text="Running files length check..." -. "${units}/log.zsh" +source "${units}/log.zsh" for file in donate help do log_text="files/${file}.txt" - . "${units}/log.zsh" + source "${units}/log.zsh" file_content="$(< "${files}/${file}.txt")" if [[ ${#file_content} -gt 4096 ]] then log_text="Error: File ${file}.txt exceeds 4096 characters limit" - . "${units}/log.zsh" + source "${units}/log.zsh" fi done log_text="Running help command check..." -. "${units}/log.zsh" +source "${units}/log.zsh" help_content="$(sed "s/{version_placeholder}/${version}/" "${files}/help.txt")" if [[ ${#help_content} -lt 1 ]] then log_text="Error: File help.txt must be at least 1 character long" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi log_text="Running donate command check..." -. "${units}/log.zsh" +source "${units}/log.zsh" donate_content="$(< "${files}/donate.txt")" @@ -537,18 +537,18 @@ then nocommand_donate=0 log_text="Warning: File donate.txt is empty, donate command is disabled" - . "${units}/log.zsh" + source "${units}/log.zsh" fi log_text="Running source command check..." -. "${units}/log.zsh" +source "${units}/log.zsh" if [[ -z "${allow_source}" && "${api_address}" != "${local_address}" && "${api_address}" != "${default_address}" ]] then nocommand_source=0 log_text="Warning: You are running bot with unknown Telegram Bot API instance, source command is disabled" - . "${units}/log.zsh" + source "${units}/log.zsh" else if ! input_data="$( curl --connect-timeout ${connrefused_timeout} \ @@ -565,7 +565,7 @@ else )" then log_text="getUserProfilePhotos: Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -573,7 +573,7 @@ else if ! jq -e '.' <<< "${input_data}" > /dev/null then log_text="getUserProfilePhotos: An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -589,7 +589,7 @@ else log_text="getUserProfilePhotos: An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -598,7 +598,7 @@ else if [[ -z "${profilephoto}" || "${profilephoto}" == "null" ]] then log_text="Error: Bot must have profile photo to run source command check" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -618,7 +618,7 @@ else )" then log_text="getFile: Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -626,7 +626,7 @@ else if ! jq -e '.' <<< "${input_data}" > /dev/null then log_text="getFile: An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -642,7 +642,7 @@ else log_text="getFile: An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -655,7 +655,7 @@ else nocommand_source=0 log_text="Error: Cannot access Telegram Bot API working directory, source command is disabled" - . "${units}/log.zsh" + source "${units}/log.zsh" fi else if ! input_data="$( @@ -673,7 +673,7 @@ else nocommand_source=0 log_text="Error: Failed to download file, source command is disabled" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ "$(jq -r '.ok' <<< "${input_data}")" == "false" ]] @@ -688,7 +688,7 @@ else log_text="Error: An unknown error occurred, source command is disabled" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi fi fi @@ -711,7 +711,7 @@ then )" then log_text="SauceNAO: Failed to access SauceNAO API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -719,7 +719,7 @@ then if ! jq -e '.' <<< "${input_data}" > /dev/null then log_text="SauceNAO: An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 fi @@ -731,19 +731,19 @@ then ;; (-2) log_text="SauceNAO: Rate limit exceeded, try again later" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 ;; (-1) log_text="SauceNAO: Invalid API key" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 ;; (*) log_text="SauceNAO: An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 1 ;; @@ -763,11 +763,11 @@ fi strftime %s > "${cache}.timer" log_text="Startup succeeded" -. "${units}/log.zsh" +source "${units}/log.zsh" while trap 'wait && exit 0' INT TERM do - . "${mods}/timer.zsh" & + source "${mods}/timer.zsh" & if ! input_data="$( curl --connect-timeout ${connrefused_timeout} \ @@ -785,7 +785,7 @@ do )" then log_text="getUpdates: Failed to access Telegram Bot API, sleeping for ${sleep_time} seconds" - . "${units}/log.zsh" + source "${units}/log.zsh" sleep ${sleep_time} continue @@ -794,7 +794,7 @@ do if ! jq -e '.' <<< "${input_data}" > /dev/null then log_text="getUpdates: An unknown error occurred, sleeping for ${sleep_time} seconds" - . "${units}/log.zsh" + source "${units}/log.zsh" sleep ${sleep_time} continue @@ -811,7 +811,7 @@ do log_text="getUpdates: An unknown error occurred, sleeping for ${sleep_time} seconds" fi - . "${units}/log.zsh" + source "${units}/log.zsh" sleep ${sleep_time} continue @@ -827,14 +827,14 @@ do if ! update="$(jq -c '.result.[0]' <<< "${input_data}")" then log_text="Failed to write update data" - . "${units}/log.zsh" + source "${units}/log.zsh" continue fi for module in callback commands inline source do - . "${mods}/${module}.zsh" & + source "${mods}/${module}.zsh" & done offset=$((update_id + 1)) diff --git a/modules/callback.zsh b/modules/callback.zsh index 84fb21a..baffad8 100644 --- a/modules/callback.zsh +++ b/modules/callback.zsh @@ -12,7 +12,7 @@ fi user_id="$(jq -r '.callback_query.from.id' <<< "${update}")" query_id="$(jq -r '.callback_query.id' <<< "${update}")" -. "${units}/user.zsh" +source "${units}/user.zsh" set -- ${callback_query[@]} command="${1}" @@ -20,22 +20,22 @@ shift case "${command}" in ("delete") - . "${submods}/callback_delete.zsh" + source "${submods}/callback_delete.zsh" ;; ("post") - . "${submods}/callback_post.zsh" + source "${submods}/callback_post.zsh" ;; ("reset") - . "${submods}/callback_reset.zsh" + source "${submods}/callback_reset.zsh" ;; ("short") - . "${submods}/callback_short.zsh" + source "${submods}/callback_short.zsh" ;; ("stop") - . "${submods}/callback_stop.zsh" + source "${submods}/callback_stop.zsh" ;; ("tags") - . "${submods}/callback_tags.zsh" + source "${submods}/callback_tags.zsh" ;; (*) exit 0 @@ -77,7 +77,7 @@ then notification_text="Failed to update message" log_text="editMessageText (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${notification_text}" ]] && ! jq -e '.' <<< "${output_data}" > /dev/null @@ -85,7 +85,7 @@ then notification_text="An unknown error occurred" log_text="editMessageText (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${notification_text}" && "$(jq -r '.ok' <<< "${output_data}")" != "true" ]] @@ -100,7 +100,7 @@ then log_text="editMessageText (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi fi @@ -121,7 +121,7 @@ if ! output_data="$( )" then log_text="answerCallbackQuery (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -129,7 +129,7 @@ fi if ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="answerCallbackQuery (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -145,5 +145,5 @@ then log_text="answerCallbackQuery (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi diff --git a/modules/commands.zsh b/modules/commands.zsh index 0eeeeeb..d2401a6 100644 --- a/modules/commands.zsh +++ b/modules/commands.zsh @@ -26,7 +26,7 @@ then unset message_thread_id fi -. "${units}/user.zsh" +source "${units}/user.zsh" set -- ${command_query[@]} command="${1}" @@ -34,49 +34,49 @@ shift case "${command}" in ("/authorize" | "/authorize@${username}") - . "${submods}/command_authorize.zsh" + source "${submods}/command_authorize.zsh" ;; ("/donate" | "/donate@${username}") - . "${submods}/command_donate.zsh" + source "${submods}/command_donate.zsh" ;; ("/export" | "/export@${username}") - . "${submods}/command_export.zsh" + source "${submods}/command_export.zsh" ;; ("/hash" | "/hash@${username}") - . "${submods}/command_hash.zsh" + source "${submods}/command_hash.zsh" ;; ("/help" | "/help@${username}") - . "${submods}/command_help.zsh" + source "${submods}/command_help.zsh" ;; ("/original" | "/original@${username}") - . "${submods}/command_original.zsh" + source "${submods}/command_original.zsh" ;; ("/ping" | "/ping@${username}") - . "${submods}/command_ping.zsh" + source "${submods}/command_ping.zsh" ;; ("/post" | "/post@${username}") - . "${submods}/command_post.zsh" + source "${submods}/command_post.zsh" ;; ("/prpr" | "/prpr@${username}") - . "${submods}/command_prpr.zsh" + source "${submods}/command_prpr.zsh" ;; ("/short" | "/short@${username}") - . "${submods}/command_short.zsh" + source "${submods}/command_short.zsh" ;; ("/shorts" | "/shorts@${username}") - . "${submods}/command_shorts.zsh" + source "${submods}/command_shorts.zsh" ;; ("/source" | "/source@${username}") - . "${submods}/command_source.zsh" + source "${submods}/command_source.zsh" ;; ("/start" | "/start@${username}") - . "${submods}/command_help.zsh" + source "${submods}/command_help.zsh" ;; ("/stop" | "/stop@${username}") - . "${submods}/command_stop.zsh" + source "${submods}/command_stop.zsh" ;; (*) - . "${submods}/url_parser.zsh" + source "${submods}/url_parser.zsh" ;; esac @@ -101,7 +101,7 @@ if ! output_data="$( )" then log_text="sendMessage (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -109,7 +109,7 @@ fi if ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="sendMessage (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -125,5 +125,5 @@ then log_text="sendMessage (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi diff --git a/modules/inline.zsh b/modules/inline.zsh index a1b2511..be26727 100644 --- a/modules/inline.zsh +++ b/modules/inline.zsh @@ -14,7 +14,7 @@ query_id="$(jq -r '.inline_query.id' <<< "${update}")" chat_type="$(jq -r '.inline_query.chat_type' <<< "${update}")" offset="$(jq -r '.inline_query.offset' <<< "${update}")" -. "${units}/user.zsh" +source "${units}/user.zsh" set -- ${inline_query[@]} command="${1}" @@ -23,30 +23,30 @@ if [[ -n "${command}" ]] then shift else - . "${submods}/inline_none.zsh" + source "${submods}/inline_none.zsh" fi case "${command}" in ("donate") - . "${submods}/inline_donate.zsh" + source "${submods}/inline_donate.zsh" ;; ("help") - . "${submods}/inline_help.zsh" + source "${submods}/inline_help.zsh" ;; ("original") - . "${submods}/inline_original.zsh" + source "${submods}/inline_original.zsh" ;; ("post") - . "${submods}/inline_post.zsh" + source "${submods}/inline_post.zsh" ;; ("short") - . "${submods}/inline_short.zsh" + source "${submods}/inline_short.zsh" ;; ("shorts" | s) - . "${submods}/inline_shorts.zsh" + source "${submods}/inline_shorts.zsh" ;; (*) - . "${submods}/inline_search.zsh" + source "${submods}/inline_search.zsh" ;; esac @@ -68,7 +68,7 @@ if ! output_data="$( )" then log_text="answerInlineQuery (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -76,7 +76,7 @@ fi if ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="answerInlineQuery (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -92,5 +92,5 @@ then log_text="answerInlineQuery (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi diff --git a/modules/source.zsh b/modules/source.zsh index b51bda2..c66fd0c 100644 --- a/modules/source.zsh +++ b/modules/source.zsh @@ -44,8 +44,8 @@ then unset message_thread_id fi -. "${units}/user.zsh" -. "${submods}/command_source.zsh" +source "${units}/user.zsh" +source "${submods}/command_source.zsh" if ! output_data="$( curl --connect-timeout ${connrefused_timeout} \ @@ -68,7 +68,7 @@ if ! output_data="$( )" then log_text="sendMessage (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -76,7 +76,7 @@ fi if ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="sendMessage (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -92,5 +92,5 @@ then log_text="sendMessage (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi diff --git a/modules/timer.zsh b/modules/timer.zsh index d412180..90380e2 100644 --- a/modules/timer.zsh +++ b/modules/timer.zsh @@ -16,8 +16,8 @@ then exit 0 fi -. "${submods}/timer_unlock.zsh" -. "${submods}/timer_uncache.zsh" +source "${submods}/timer_unlock.zsh" +source "${submods}/timer_uncache.zsh" strftime %s > "${cache}.timer" rmdir "${cache}.lock" diff --git a/submodules/callback_delete.zsh b/submodules/callback_delete.zsh index d826085..61286ac 100644 --- a/submodules/callback_delete.zsh +++ b/submodules/callback_delete.zsh @@ -23,7 +23,7 @@ then notification_text="Failed to delete message" log_text="deleteMessage (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -33,7 +33,7 @@ then notification_text="An unknown error occurred" log_text="deleteMessage (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -50,5 +50,5 @@ then log_text="deleteMessage (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi diff --git a/submodules/callback_post.zsh b/submodules/callback_post.zsh index 743f7c7..05a5bb8 100644 --- a/submodules/callback_post.zsh +++ b/submodules/callback_post.zsh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 ib_lock=0 -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${notification_text}" ]] then @@ -18,7 +18,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${notification_text}" ]] then @@ -26,7 +26,7 @@ then return 0 fi -. "${units}/ib_post.zsh" +source "${units}/ib_post.zsh" link_preview_options="$( jq --null-input --compact-output \ diff --git a/submodules/callback_stop.zsh b/submodules/callback_stop.zsh index f0e3818..3af5860 100644 --- a/submodules/callback_stop.zsh +++ b/submodules/callback_stop.zsh @@ -60,7 +60,7 @@ then fi fi -. "${units}/stop.zsh" +source "${units}/stop.zsh" for lock in ${user_locks[@]} do diff --git a/submodules/callback_tags.zsh b/submodules/callback_tags.zsh index b69aae8..a74512a 100644 --- a/submodules/callback_tags.zsh +++ b/submodules/callback_tags.zsh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 ib_lock=0 -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${notification_text}" ]] then @@ -18,7 +18,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${notification_text}" ]] then @@ -36,8 +36,8 @@ ib_tags=($(jq -r ".${ib_iarray}[0].${ib_itags}" "${ib_file}" | htmlescape)) ib_groups_offset=${1:-0} ib_tags_offset=${1:-0} -. "${units}/ib_size.zsh" -. "${units}/ib_meta.zsh" +source "${units}/ib_size.zsh" +source "${units}/ib_meta.zsh" if [[ -z "${ib_tags}" || "${ib_tags}" == "null" ]] then diff --git a/submodules/command_authorize.zsh b/submodules/command_authorize.zsh index ae1262f..fdc1b53 100644 --- a/submodules/command_authorize.zsh +++ b/submodules/command_authorize.zsh @@ -5,8 +5,8 @@ if [[ -n "${1}" ]] then ib_board="${1}" - . "${units}/ib_config.zsh" - . "${units}/ib_authconfig.zsh" + source "${units}/ib_config.zsh" + source "${units}/ib_authconfig.zsh" if [[ -z "${ib_auth}" ]] then @@ -32,7 +32,7 @@ then shift fi -. "${units}/ib_lock.zsh" +source "${units}/ib_lock.zsh" if [[ -z "${output_text}" ]] then diff --git a/submodules/command_export.zsh b/submodules/command_export.zsh index e90b181..aab24dc 100644 --- a/submodules/command_export.zsh +++ b/submodules/command_export.zsh @@ -16,7 +16,7 @@ do done done -. "${units}/export.zsh" +source "${units}/export.zsh" for lock in ${user_locks[@]} do diff --git a/submodules/command_hash.zsh b/submodules/command_hash.zsh index 0558ff6..6bd97d6 100644 --- a/submodules/command_hash.zsh +++ b/submodules/command_hash.zsh @@ -30,8 +30,8 @@ done for ib_board in {a..z} do - . "${units}/ib_config.zsh" - . "${units}/ib_hash.zsh" & + source "${units}/ib_config.zsh" + source "${units}/ib_hash.zsh" & wait if ! [[ -f "${ib_post}" ]] diff --git a/submodules/command_original.zsh b/submodules/command_original.zsh index 0132ade..bab3d8c 100644 --- a/submodules/command_original.zsh +++ b/submodules/command_original.zsh @@ -2,14 +2,14 @@ # Copyright (C) 2024-2025 Danil Lisin # SPDX-License-Identifier: Apache-2.0 -. "${units}/ib_name.zsh" +source "${units}/ib_name.zsh" if [[ -n "${output_text}" ]] then return 0 fi -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${output_text}" ]] then @@ -24,7 +24,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -32,7 +32,7 @@ then return 0 fi -. "${units}/ib_original.zsh" +source "${units}/ib_original.zsh" if [[ -n "${ib_file_url}" && "${ib_file_url}" != "null" ]] then @@ -70,13 +70,13 @@ if ! output_data="$( )" then log_text="sendChatAction (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${log_text}" ]] && ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="sendChatAction (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${log_text}" && "$(jq -r '.ok' <<< "${output_data}")" != "true" ]] @@ -90,7 +90,7 @@ then log_text="sendChatAction (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi if ! output_data="$( @@ -115,7 +115,7 @@ then output_text="Failed to send original file" log_text="sendDocument (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" rmdir "${cache}/${ib_hash}.lock" return 0 @@ -126,7 +126,7 @@ then output_text="An unknown error occurred" log_text="sendDocument (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" rmdir "${cache}/${ib_hash}.lock" return 0 @@ -144,7 +144,7 @@ then log_text="sendDocument (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" rmdir "${cache}/${ib_hash}.lock" return 0 diff --git a/submodules/command_ping.zsh b/submodules/command_ping.zsh index 7f76faa..9bca844 100644 --- a/submodules/command_ping.zsh +++ b/submodules/command_ping.zsh @@ -25,7 +25,7 @@ then output_text="Failed to measure latency" log_text="sendMessage (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -37,7 +37,7 @@ then output_text="An unknown error occurred" log_text="sendMessage (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -54,7 +54,7 @@ then log_text="sendMessage (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -82,7 +82,7 @@ if ! output_data="$( )" then log_text="editMessageText (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -90,7 +90,7 @@ fi if ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="editMessageText (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" exit 0 fi @@ -106,7 +106,7 @@ then log_text="editMessageText (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi exit 0 diff --git a/submodules/command_post.zsh b/submodules/command_post.zsh index fde8ed7..bf5fdf7 100644 --- a/submodules/command_post.zsh +++ b/submodules/command_post.zsh @@ -2,14 +2,14 @@ # Copyright (C) 2024-2025 Danil Lisin # SPDX-License-Identifier: Apache-2.0 -. "${units}/ib_name.zsh" +source "${units}/ib_name.zsh" if [[ -n "${output_text}" ]] then return 0 fi -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${output_text}" ]] then @@ -24,7 +24,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -32,7 +32,7 @@ then return 0 fi -. "${units}/ib_post.zsh" +source "${units}/ib_post.zsh" link_preview_options="$( jq --null-input --compact-output \ diff --git a/submodules/command_source.zsh b/submodules/command_source.zsh index 99fbc88..db2d2ce 100644 --- a/submodules/command_source.zsh +++ b/submodules/command_source.zsh @@ -12,7 +12,7 @@ do sleep 1 done -. "${units}/sn_auth.zsh" +source "${units}/sn_auth.zsh" rmdir "${user_config}_source.lock" @@ -21,7 +21,7 @@ then return 0 fi -. "${units}/sn_get.zsh" +source "${units}/sn_get.zsh" if [[ -n "${output_text}" ]] then diff --git a/submodules/command_stop.zsh b/submodules/command_stop.zsh index 4b6307d..d69d20d 100644 --- a/submodules/command_stop.zsh +++ b/submodules/command_stop.zsh @@ -16,7 +16,7 @@ do done done -. "${units}/stop.zsh" +source "${units}/stop.zsh" for lock in ${user_locks[@]} do diff --git a/submodules/inline_donate.zsh b/submodules/inline_donate.zsh index 7eb0396..1b27967 100644 --- a/submodules/inline_donate.zsh +++ b/submodules/inline_donate.zsh @@ -4,7 +4,7 @@ if [[ -n "${nocommand_donate}" ]] then - . "${submods}/inline_help.zsh" + source "${submods}/inline_help.zsh" return 0 fi diff --git a/submodules/inline_original.zsh b/submodules/inline_original.zsh index 7cc5eeb..5a7a70b 100644 --- a/submodules/inline_original.zsh +++ b/submodules/inline_original.zsh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 ib_lock=0 -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${output_text}" ]] then @@ -27,7 +27,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -44,7 +44,7 @@ then return 0 fi -. "${units}/ib_original.zsh" +source "${units}/ib_original.zsh" if [[ -n "${output_text}" ]] then diff --git a/submodules/inline_post.zsh b/submodules/inline_post.zsh index 5202741..79f2903 100644 --- a/submodules/inline_post.zsh +++ b/submodules/inline_post.zsh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 ib_lock=0 -. "${units}/ib_common.zsh" +source "${units}/ib_common.zsh" if [[ -n "${output_text}" ]] then @@ -27,7 +27,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -44,7 +44,7 @@ then return 0 fi -. "${units}/ib_post.zsh" +source "${units}/ib_post.zsh" output_title="Information of post ${ib_post_id}" output_description="Click to send post information" diff --git a/submodules/inline_search.zsh b/submodules/inline_search.zsh index 96f3ce9..59a1bd1 100644 --- a/submodules/inline_search.zsh +++ b/submodules/inline_search.zsh @@ -17,14 +17,14 @@ case "${command}" in ;; (*) set -- ${inline_query[@]} - . "${submods}/inline_none.zsh" + source "${submods}/inline_none.zsh" case "${command}" in ("shorts") - . "${submods}/inline_shorts.zsh" + source "${submods}/inline_shorts.zsh" ;; ("help") - . "${submods}/inline_help.zsh" + source "${submods}/inline_help.zsh" ;; esac @@ -33,7 +33,7 @@ case "${command}" in esac ib_lock=0 -. "${units}/ib_search.zsh" +source "${units}/ib_search.zsh" if [[ -n "${output_text}" ]] then @@ -67,7 +67,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -128,13 +128,13 @@ do case "${ib_mode}" in (l) - . "${submods}/inline_search_pools.zsh" + source "${submods}/inline_search_pools.zsh" ;; (p) - . "${submods}/inline_search_posts.zsh" + source "${submods}/inline_search_posts.zsh" ;; (t) - . "${submods}/inline_search_tags.zsh" + source "${submods}/inline_search_tags.zsh" ;; esac diff --git a/submodules/inline_search_pools.zsh b/submodules/inline_search_pools.zsh index 0ab047d..c3d15c3 100644 --- a/submodules/inline_search_pools.zsh +++ b/submodules/inline_search_pools.zsh @@ -7,7 +7,7 @@ ib_pool="${ib_pools[idx]}" ib_count="${ib_counts[idx]}" unset ib_date_text -. "${units}/ib_date.zsh" +source "${units}/ib_date.zsh" if [[ -n "${ib_ispace}" ]] then diff --git a/submodules/inline_search_posts.zsh b/submodules/inline_search_posts.zsh index 5643b2e..aab6775 100644 --- a/submodules/inline_search_posts.zsh +++ b/submodules/inline_search_posts.zsh @@ -11,8 +11,8 @@ ib_width="${ib_widths[idx]}" ib_height="${ib_heights[idx]}" unset ib_date_text ib_resolution_text ib_type_text ib_size_text -. "${units}/ib_date.zsh" -. "${units}/ib_meta.zsh" +source "${units}/ib_date.zsh" +source "${units}/ib_meta.zsh" if [[ -n "${ib_preview}" ]] then @@ -130,5 +130,5 @@ fi if [[ "${cache_mode}" == "advanced" ]] then - . "${units}/ib_cache.zsh" & + source "${units}/ib_cache.zsh" & fi diff --git a/submodules/inline_shorts.zsh b/submodules/inline_shorts.zsh index 2fa2afd..a8a48d6 100644 --- a/submodules/inline_shorts.zsh +++ b/submodules/inline_shorts.zsh @@ -8,7 +8,7 @@ do done shorts_config="${user_config}/shorts" -. "${units}/shorts_search.zsh" +source "${units}/shorts_search.zsh" if [[ -n "${output_text}" ]] then diff --git a/submodules/url_parser.zsh b/submodules/url_parser.zsh index fa1a28a..064c264 100644 --- a/submodules/url_parser.zsh +++ b/submodules/url_parser.zsh @@ -47,8 +47,8 @@ then exit 0 fi -. "${units}/ib_config.zsh" -. "${units}/ib_authconfig.zsh" +source "${units}/ib_config.zsh" +source "${units}/ib_authconfig.zsh" if [[ ${#ib_post_id} -gt 32 ]] then @@ -68,7 +68,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -86,7 +86,7 @@ then return 0 fi -. "${units}/ib_post.zsh" +source "${units}/ib_post.zsh" link_preview_options="$( jq --null-input --compact-output \ diff --git a/units/export.zsh b/units/export.zsh index 13ec40a..5907e77 100644 --- a/units/export.zsh +++ b/units/export.zsh @@ -39,13 +39,13 @@ if ! output_data="$( )" then log_text="sendChatAction (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${log_text}" ]] && ! jq -e '.' <<< "${output_data}" > /dev/null then log_text="sendChatAction (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" fi if [[ -z "${log_text}" && "$(jq -r '.ok' <<< "${output_data}")" != "true" ]] @@ -59,7 +59,7 @@ then log_text="sendChatAction (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi if ! output_data="$( @@ -81,7 +81,7 @@ then output_text="Failed to send user data" log_text="sendDocument (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" rmdir "${cache}/${user_id}.lock" return 0 @@ -92,7 +92,7 @@ then output_text="An unknown error occurred" log_text="sendDocument (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" rmdir "${cache}/${user_id}.lock" return 0 @@ -110,7 +110,7 @@ then log_text="sendDocument (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" fi rmdir "${cache}/${user_id}.lock" diff --git a/units/ib_auth.zsh b/units/ib_auth.zsh index 423649e..126af44 100644 --- a/units/ib_auth.zsh +++ b/units/ib_auth.zsh @@ -32,16 +32,16 @@ fi case "${ib_board}" in (a|d) - . "${auth}/donmai.zsh" + source "${auth}/donmai.zsh" ;; (g) - . "${auth}/gelbooru.zsh" + source "${auth}/gelbooru.zsh" ;; (i|s) - . "${auth}/sankakucomplex.zsh" + source "${auth}/sankakucomplex.zsh" ;; (k|y) - . "${auth}/moebooru.zsh" + source "${auth}/moebooru.zsh" ;; esac diff --git a/units/ib_authconfig.zsh b/units/ib_authconfig.zsh index b518b71..eec02db 100644 --- a/units/ib_authconfig.zsh +++ b/units/ib_authconfig.zsh @@ -9,16 +9,16 @@ token_file="${auth_dir}/token" case "${ib_board}" in (a|d) - . "${auth}/config/donmai.zsh" + source "${auth}/config/donmai.zsh" ;; (g) - . "${auth}/config/gelbooru.zsh" + source "${auth}/config/gelbooru.zsh" ;; (i|s) - . "${auth}/config/sankakucomplex.zsh" + source "${auth}/config/sankakucomplex.zsh" ;; (k|y) - . "${auth}/config/moebooru.zsh" + source "${auth}/config/moebooru.zsh" ;; esac diff --git a/units/ib_common.zsh b/units/ib_common.zsh index da257a8..35fd137 100644 --- a/units/ib_common.zsh +++ b/units/ib_common.zsh @@ -7,8 +7,8 @@ then ib_board="${1}" ib_mode="p" - . "${units}/ib_config.zsh" - . "${units}/ib_authconfig.zsh" + source "${units}/ib_config.zsh" + source "${units}/ib_authconfig.zsh" if [[ -z "${ib_data_url}" ]] then diff --git a/units/ib_config.zsh b/units/ib_config.zsh index f30d73f..25054c6 100644 --- a/units/ib_config.zsh +++ b/units/ib_config.zsh @@ -8,15 +8,15 @@ ib_error_height=516 case "${ib_board}" in (a|d) - . "${config}/donmai.zsh" + source "${config}/donmai.zsh" ;; (g) - . "${config}/gelbooru.zsh" + source "${config}/gelbooru.zsh" ;; (i|s) - . "${config}/sankakucomplex.zsh" + source "${config}/sankakucomplex.zsh" ;; (k|y) - . "${config}/moebooru.zsh" + source "${config}/moebooru.zsh" ;; esac diff --git a/units/ib_file.zsh b/units/ib_file.zsh index 359fb80..7b70816 100644 --- a/units/ib_file.zsh +++ b/units/ib_file.zsh @@ -15,7 +15,7 @@ fi if [[ -d "${auth_dir}" ]] then - . "${units}/ib_token.zsh" + source "${units}/ib_token.zsh" if [[ -n "${output_text}" ]] then @@ -67,7 +67,7 @@ then notification_text="${output_text}" log_text="ib_file (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" next_offset=${inline_page:-0} @@ -82,7 +82,7 @@ then notification_text="${output_text}" log_text="ib_file (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" rm -f "${ib_file}" return 0 diff --git a/units/ib_hash.zsh b/units/ib_hash.zsh index b58bb0d..26b9af2 100644 --- a/units/ib_hash.zsh +++ b/units/ib_hash.zsh @@ -5,8 +5,8 @@ rm -f "${ib_post}" ib_mode="p" -. "${units}/ib_config.zsh" -. "${units}/ib_authconfig.zsh" +source "${units}/ib_config.zsh" +source "${units}/ib_authconfig.zsh" if [[ -z "${ib_data_url}" ]] then @@ -23,7 +23,7 @@ do sleep 1 done -. "${units}/ib_file.zsh" +source "${units}/ib_file.zsh" if [[ -n "${output_text}" ]] then @@ -42,7 +42,7 @@ then ib_sample_url="$(jq -r ".${ib_iarray}[0].${ib_isample}" "${ib_file}")" ib_preview_url="$(jq -r ".${ib_iarray}[0].${ib_ipreview}" "${ib_file}")" - . "${units}/ib_meta.zsh" + source "${units}/ib_meta.zsh" printf "%s\n" "${ib_sample_url}" > "${ib_sample}" fi diff --git a/units/ib_lock.zsh b/units/ib_lock.zsh index 9adc233..cadebc5 100644 --- a/units/ib_lock.zsh +++ b/units/ib_lock.zsh @@ -7,6 +7,6 @@ do sleep 1 done -. "${units}/ib_auth.zsh" +source "${units}/ib_auth.zsh" rmdir "${user_config}_auth.lock" diff --git a/units/ib_meta.zsh b/units/ib_meta.zsh index 6c9d12e..4109759 100644 --- a/units/ib_meta.zsh +++ b/units/ib_meta.zsh @@ -34,15 +34,15 @@ then ib_type="photo" ;; (gif) - . "${units}/ib_preview.zsh" + source "${units}/ib_preview.zsh" ib_type="gif" ;; (mp4) - . "${units}/ib_preview.zsh" + source "${units}/ib_preview.zsh" ib_type="video" ;; (zip | webm) - . "${units}/ib_sample.zsh" + source "${units}/ib_sample.zsh" ;; (*) ib_sample_url="${ib_error_url}" @@ -66,7 +66,7 @@ if [[ -n "${ib_file_size}" && "${ib_file_size}" != "null" && ${ib_file_size} -gt then if [[ ${ib_file_size} -gt 20971520 && "${ib_sample_url}" == "${ib_file_url}" ]] then - . "${units}/ib_sample.zsh" + source "${units}/ib_sample.zsh" fi size_offset=1.0 diff --git a/units/ib_name.zsh b/units/ib_name.zsh index b6cf26a..5531d79 100644 --- a/units/ib_name.zsh +++ b/units/ib_name.zsh @@ -24,7 +24,7 @@ ib_reply_name="$(sed '1!d' <<< "${reply_text}")" for ib_board in {a..z} 0 do - . "${units}/ib_config.zsh" + source "${units}/ib_config.zsh" if [[ "${ib_reply_name}" == "${ib_name}" ]] then diff --git a/units/ib_original.zsh b/units/ib_original.zsh index d20db77..13a6930 100644 --- a/units/ib_original.zsh +++ b/units/ib_original.zsh @@ -5,7 +5,7 @@ ib_file_size="$(jq -r ".${ib_iarray}[0].${ib_isize}" "${ib_file}")" ib_file_url="$(jq -r ".${ib_iarray}[0].${ib_ifile}" "${ib_file}")" -. "${units}/ib_size.zsh" +source "${units}/ib_size.zsh" if [[ -n "${ib_file_url}" && "${ib_file_url}" != "null" ]] then @@ -14,7 +14,7 @@ then ib_width="$(jq -r ".${ib_iarray}[0].${ib_iwidth}" "${ib_file}")" ib_height="$(jq -r ".${ib_iarray}[0].${ib_iheight}" "${ib_file}")" - . "${units}/ib_meta.zsh" + source "${units}/ib_meta.zsh" else output_text="No original file found" return 0 diff --git a/units/ib_post.zsh b/units/ib_post.zsh index 5310429..5a435e5 100644 --- a/units/ib_post.zsh +++ b/units/ib_post.zsh @@ -17,9 +17,9 @@ ib_md5="$(jq -r ".${ib_iarray}[0].${ib_imd5}" "${ib_file}")" ib_source="$(jq -r ".${ib_iarray}[0].${ib_isource}" "${ib_file}" | htmlescape)" ib_tags=($(jq -r ".${ib_iarray}[0].${ib_itags}" "${ib_file}")) -. "${units}/ib_date.zsh" -. "${units}/ib_size.zsh" -. "${units}/ib_meta.zsh" +source "${units}/ib_date.zsh" +source "${units}/ib_size.zsh" +source "${units}/ib_meta.zsh" output_text="$(printf "<b>%s</b>\n<b>ID:</b> <code>%s</code>" "${ib_name}" "${ib_id}")" diff --git a/units/ib_search.zsh b/units/ib_search.zsh index 423b5a1..4a95a69 100644 --- a/units/ib_search.zsh +++ b/units/ib_search.zsh @@ -6,8 +6,8 @@ if [[ -n "${1}" ]] then ib_board="${1}" - . "${units}/ib_config.zsh" - . "${units}/ib_authconfig.zsh" + source "${units}/ib_config.zsh" + source "${units}/ib_authconfig.zsh" if [[ -z "${ib_data_url}" ]] then diff --git a/units/ib_token.zsh b/units/ib_token.zsh index e8bb982..5898b44 100644 --- a/units/ib_token.zsh +++ b/units/ib_token.zsh @@ -22,13 +22,13 @@ then then if [[ -n "${ib_lock}" ]] then - . "${units}/ib_lock.zsh" & + source "${units}/ib_lock.zsh" & output_title="Refreshing ${ib_name} session..." output_text="Try again in a few seconds" notification_text="${output_title} ${output_text}" else - . "${units}/ib_auth.zsh" + source "${units}/ib_auth.zsh" fi fi fi diff --git a/units/sn_auth.zsh b/units/sn_auth.zsh index ed1d041..fb8cbc9 100644 --- a/units/sn_auth.zsh +++ b/units/sn_auth.zsh @@ -35,7 +35,7 @@ then output_text="Failed to access SauceNAO API" log_text="sn_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -45,7 +45,7 @@ then output_text="An unknown error occurred" log_text="sn_auth (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi diff --git a/units/sn_get.zsh b/units/sn_get.zsh index c70075d..c50d0a3 100644 --- a/units/sn_get.zsh +++ b/units/sn_get.zsh @@ -37,7 +37,7 @@ then output_text="Failed to get image file" log_text="getFile (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -47,7 +47,7 @@ then output_text="An unknown error occurred" log_text="getFile (${update_id}): An unknown error occurred" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -64,7 +64,7 @@ then log_text="getFile (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -93,7 +93,7 @@ then output_text="Failed to download image file" log_text="getFile (${update_id}): Failed to access Telegram Bot API" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -110,7 +110,7 @@ then log_text="getFile (${update_id}): An unknown error occurred" fi - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -118,6 +118,6 @@ then fi sn_query="file=@${file_path}" -. "${units}/sn_search.zsh" +source "${units}/sn_search.zsh" rmdir "${cache}/${update_id}_file.lock" diff --git a/units/sn_search.zsh b/units/sn_search.zsh index b5dda9c..0090de9 100644 --- a/units/sn_search.zsh +++ b/units/sn_search.zsh @@ -28,7 +28,7 @@ then output_text="Failed to access SauceNAO API" log_text="sn_search (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi @@ -38,7 +38,7 @@ then output_text="An unknown error occurred" log_text="sn_search (${update_id}): ${output_text}" - . "${units}/log.zsh" + source "${units}/log.zsh" return 0 fi |
