From bc4627a762b616a4ae5c7ec9fee1015308c47389 Mon Sep 17 00:00:00 2001 From: Siphonight Date: Thu, 13 Feb 2025 07:30:12 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20du=20script=20de=20base=20pour=20c?= =?UTF-8?q?ompatibilit=C3=83=20=C2=A9H?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modification du script de base pour la compatibilità avec SH. En Bash, les tests dans les conditions if son plus surs et sÃcurisÃs en utilisant les "[[ condition ]]". Cependant ces derniers sont une spÃcificità supportÃe uniquement dans Bash et non SH. SH ayant une plus grande compatibilitéavec le reste des shells, il faut de ce fait que cet utilitaire y soit adaptÃ. --- bw_cli_autolog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bw_cli_autolog.sh b/bw_cli_autolog.sh index 5f272c0..889ede5 100644 --- a/bw_cli_autolog.sh +++ b/bw_cli_autolog.sh @@ -3,7 +3,7 @@ identities_create() { # IDENTITES Inception_Detect=0 - if [[ -z "${BW_Session}" ]] || [[ $(echo "${BW_Session}" | wc -c) -lt 10 ]]; then + if [ -z "${BW_Session}" ] || [ $(echo "${BW_Session}" | wc -c) -lt 10 ]; then tput setaf 4 echo -e "Lancement du autologin (ne prenez pas en compte les tokens, ils sont gérés automatiquement)." tput sgr0 @@ -20,7 +20,7 @@ identities_create() { BW_List=$(bw list items --session "$BW_Session") if [ "$BW_List" != "" ]; then - if [[ "${Inception_Detect}" != "1" ]]; then + if [ "${Inception_Detect}" != "1" ]; then unset BW_Session fi