diff options
| -rw-r--r-- | units/ib_file.zsh | 8 | ||||
| -rw-r--r-- | units/ib_token.zsh | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/units/ib_file.zsh b/units/ib_file.zsh index f37fedb..afb9658 100644 --- a/units/ib_file.zsh +++ b/units/ib_file.zsh @@ -13,16 +13,24 @@ then fi fi +until mkdir "${user_config}.lock" +do + sleep 1 +done + if [[ -d "${auth_dir}" ]] then source "${units}/ib_token.zsh" if [[ -n "${output_text}" ]] then + rmdir "${user_config}.lock" return fi fi +rmdir "${user_config}.lock" + if [[ -n "${ib_limit}" ]] then ib_limit="${ib_dlimit}=${ib_limit}" diff --git a/units/ib_token.zsh b/units/ib_token.zsh index 95e289e..00d8ce2 100644 --- a/units/ib_token.zsh +++ b/units/ib_token.zsh @@ -2,11 +2,6 @@ # Copyright (C) 2024-2026 Danil Lisin # SPDX-License-Identifier: Apache-2.0 -until mkdir "${user_config}.lock" -do - sleep 1 -done - if [[ -n "${ib_raw}" ]] then ib_dfield1="${ib_login_file}=$(< "${login_file}")" @@ -37,5 +32,3 @@ if [[ -f "${token_file}" ]] then ib_headers="${ib_header} $(< "${token_file}")" fi - -rmdir "${user_config}.lock" |
