Created
January 6, 2026 05:46
-
-
Save yeiichi/5c3bd8a2fbb80eb7b1feb19734b0dfea to your computer and use it in GitHub Desktop.
Create a Django-ish repo (Type_A)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Create a Django-ish repo (Type_A) | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # --- Config --- | |
| PARENT="${HOME}/name_of_parent_directory" | |
| ROOT="${PARENT}/name_of_django_project" | |
| ENV_DIR="${ROOT}/env" | |
| DIRS=( | |
| "${ROOT}/app/config" | |
| "${ROOT}/app/apps/core" | |
| "${ENV_DIR}" | |
| ) | |
| FILES=( | |
| "${ROOT}/Dockerfile" | |
| "${ROOT}/compose.yaml" | |
| "${ENV_DIR}/.env.example" | |
| ) | |
| # --- Helpers --- | |
| log() { printf '[%s] %s\n' "$(date +'%F %T')" "$*"; } | |
| # --- Create directories --- | |
| log "Creating directories..." | |
| mkdir -p "${DIRS[@]}" | |
| # --- Create stub files --- | |
| log "Creating stub files..." | |
| touch "${FILES[@]}" | |
| log "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment