fix(shell): use [[ instead of [ for conditional tests

Replace single brackets with double brackets in bash conditional
expressions across 14 files (28 changes). All scripts use bash
shebangs so [[ is safe everywhere (SonarCloud rule shelldre:S7688).
This commit is contained in:
2026-02-07 13:59:08 +02:00
parent 89aeb29c04
commit 63a21d08b4
14 changed files with 27 additions and 27 deletions

View File

@@ -5,7 +5,7 @@ set -euo pipefail
#
# Check if the script is running on macOS
if [ "$(uname)" != "Darwin" ]; then
if [[ "$(uname)" != "Darwin" ]]; then
msgr warn "Not a macOS system"
exit 0
fi
@@ -40,7 +40,7 @@ prompt_xcode_install()
'tell app "System Events" to display dialog "Please click install when Command Line Developer Tools appears"'
)"
if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then
if [[ "$XCODE_MESSAGE" = "button returned:OK" ]]; then
xcode-select --install
else
msgr warn "You have cancelled the installation, please rerun the installer."
@@ -53,13 +53,13 @@ main()
{
keep_alive_sudo
if [ -x "$XCODE_SWIFT_PATH" ]; then
if [[ -x "$XCODE_SWIFT_PATH" ]]; then
msgr run "You have swift from xcode-select. Continuing..."
else
prompt_xcode_install
fi
until [ -f "$XCODE_SWIFT_PATH" ]; do
until [[ -f "$XCODE_SWIFT_PATH" ]]; do
echo -n "."
sleep 1
done