refactor: Standardize Bash conditionals to [[ ... ]] syntax
This commit is contained in:
parent
14d78d65ea
commit
188feabecc
2 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ for entry in "${GENOMES[@]}"; do
|
||||||
|
|
||||||
GENOME_PATH="${WORK_DIR}/${MASTER_REPO}/${GENOME_NAME}"
|
GENOME_PATH="${WORK_DIR}/${MASTER_REPO}/${GENOME_NAME}"
|
||||||
|
|
||||||
if [ ! -d "${GENOME_PATH}" ]; then
|
if [[ ! -d "${GENOME_PATH}" ]]; then
|
||||||
cd "${WORK_DIR}/${MASTER_REPO}"
|
cd "${WORK_DIR}/${MASTER_REPO}"
|
||||||
info "Linking ${GENOME_NAME} as a submodule..."
|
info "Linking ${GENOME_NAME} as a submodule..."
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ provider_create_repo "${MASTER_REPO}" "Knowledge Genome Master Repository" "true
|
||||||
mkdir -p "${WORK_DIR}/${MASTER_REPO}"
|
mkdir -p "${WORK_DIR}/${MASTER_REPO}"
|
||||||
cd "${WORK_DIR}/${MASTER_REPO}"
|
cd "${WORK_DIR}/${MASTER_REPO}"
|
||||||
|
|
||||||
if [ ! -d ".git" ]; then
|
if [[ ! -d ".git" ]]; then
|
||||||
info "Initializing Git in Master repository..."
|
info "Initializing Git in Master repository..."
|
||||||
git init
|
git init
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ if [ ! -d ".git" ]; then
|
||||||
SSH_URL=$(provider_ssh_url "${MASTER_REPO}")
|
SSH_URL=$(provider_ssh_url "${MASTER_REPO}")
|
||||||
git remote add origin "${SSH_URL}"
|
git remote add origin "${SSH_URL}"
|
||||||
|
|
||||||
if [ -n "${GIST_URL:-}" ]; then
|
if [[ -n "${GIST_URL:-}" ]]; then
|
||||||
info "Adding core-karpathy as an external reference..."
|
info "Adding core-karpathy as an external reference..."
|
||||||
git submodule add "${GIST_URL}" core-karpathy || warn "Could not add core-karpathy submodule."
|
git submodule add "${GIST_URL}" core-karpathy || warn "Could not add core-karpathy submodule."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue