refactor: Standardize Bash conditionals to [[ ... ]] syntax

This commit is contained in:
Matteo Cherubini 2026-05-10 10:10:22 +02:00
parent 14d78d65ea
commit 188feabecc
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@ for entry in "${GENOMES[@]}"; do
GENOME_PATH="${WORK_DIR}/${MASTER_REPO}/${GENOME_NAME}"
if [ ! -d "${GENOME_PATH}" ]; then
if [[ ! -d "${GENOME_PATH}" ]]; then
cd "${WORK_DIR}/${MASTER_REPO}"
info "Linking ${GENOME_NAME} as a submodule..."

View file

@ -19,7 +19,7 @@ provider_create_repo "${MASTER_REPO}" "Knowledge Genome Master Repository" "true
mkdir -p "${WORK_DIR}/${MASTER_REPO}"
cd "${WORK_DIR}/${MASTER_REPO}"
if [ ! -d ".git" ]; then
if [[ ! -d ".git" ]]; then
info "Initializing Git in Master repository..."
git init
@ -27,7 +27,7 @@ if [ ! -d ".git" ]; then
SSH_URL=$(provider_ssh_url "${MASTER_REPO}")
git remote add origin "${SSH_URL}"
if [ -n "${GIST_URL:-}" ]; then
if [[ -n "${GIST_URL:-}" ]]; then
info "Adding core-karpathy as an external reference..."
git submodule add "${GIST_URL}" core-karpathy || warn "Could not add core-karpathy submodule."
fi