Skip to content

Instantly share code, notes, and snippets.

@rg3915
Last active October 25, 2025 07:01
Show Gist options
  • Save rg3915/7842b05ff93d9fd87f977d3c0b9300d3 to your computer and use it in GitHub Desktop.
Save rg3915/7842b05ff93d9fd87f977d3c0b9300d3 to your computer and use it in GitHub Desktop.

Revisions

  1. rg3915 revised this gist Oct 25, 2025. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions script.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ fi

    # Entra na pasta /tmp/boilerplate
    cd /tmp/boilerplate
    echo "Você está agora em: $(pwd)"
    echo "Você está agora em: /tmp/boilerplate"

    python -m venv .venv
    source .venv/bin/activate
    @@ -31,12 +31,12 @@ git clone https://github.com/rg3915/copier-django-template.git /tmp/copier-djang
    cd /tmp/copier-django-template

    # copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER
    copier copy --vcs-ref=main . $CURRENT_FOLDER
    copier copy --vcs-ref=main . /tmp/boilerplate

    deactivate

    # Volta para o diretório inicial
    cd "$CURRENT_FOLDER"
    cd /tmp/boilerplate
    echo "Voltou para: $(pwd)"

    rm -f script.sh
  2. rg3915 revised this gist Oct 25, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion script.sh
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ git clone https://github.com/rg3915/copier-django-template.git /tmp/copier-djang
    cd /tmp/copier-django-template

    # copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER
    copier copy . $CURRENT_FOLDER
    copier copy --vcs-ref=main . $CURRENT_FOLDER

    deactivate

  3. rg3915 revised this gist Oct 25, 2025. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions script.sh
    Original file line number Diff line number Diff line change
    @@ -22,9 +22,16 @@ echo "Você está agora em: $(pwd)"
    python -m venv .venv
    source .venv/bin/activate

    pip install copier==9.10.0
    pip install copier

    copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER
    # rm -rf /tmp/copier-django-template

    git clone https://github.com/rg3915/copier-django-template.git /tmp/copier-django-template

    cd /tmp/copier-django-template

    # copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER
    copier copy . $CURRENT_FOLDER

    deactivate

  4. rg3915 revised this gist Oct 25, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion script.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ echo "Você está agora em: $(pwd)"
    python -m venv .venv
    source .venv/bin/activate

    pip install copier
    pip install copier==9.10.0

    copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER

  5. rg3915 renamed this gist May 14, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. rg3915 created this gist May 14, 2025.
    48 changes: 48 additions & 0 deletions script.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    #!/bin/bash

    # Script rápido para Linux. No Windows siga o passo a passo do README.
    # Repo completo no Github: https://github.com/rg3915/copier-django-template

    # Salva o diretório atual em uma variável
    CURRENT_FOLDER=$(pwd)
    # echo "Diretório inicial: $CURRENT_FOLDER"

    # Cria a pasta /tmp/boilerplate se não existir
    if [ ! -d "/tmp/boilerplate" ]; then
    # echo "Criando diretório: /tmp/boilerplate"
    mkdir -p /tmp/boilerplate
    else
    echo "Diretório já existe: /tmp/boilerplate"
    fi

    # Entra na pasta /tmp/boilerplate
    cd /tmp/boilerplate
    echo "Você está agora em: $(pwd)"

    python -m venv .venv
    source .venv/bin/activate

    pip install copier

    copier copy https://github.com/rg3915/copier-django-template.git $CURRENT_FOLDER

    deactivate

    # Volta para o diretório inicial
    cd "$CURRENT_FOLDER"
    echo "Voltou para: $(pwd)"

    rm -f script.sh
    rm -rf img

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt

    cp env.sample .env

    python manage.py migrate

    python manage.py createsuperuser --username="admin" --email="[email protected]"

    tree