Skip to content

Instantly share code, notes, and snippets.

@yeiichi
Created January 6, 2026 05:46
Show Gist options
  • Select an option

  • Save yeiichi/5c3bd8a2fbb80eb7b1feb19734b0dfea to your computer and use it in GitHub Desktop.

Select an option

Save yeiichi/5c3bd8a2fbb80eb7b1feb19734b0dfea to your computer and use it in GitHub Desktop.
Create a Django-ish repo (Type_A)
#!/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