#!/usr/bin/env bash # Copyright 2023 Julian Müller (ChaoticByte) # change to correct directory, if necessary script_absolute=$(realpath "$0") script_directory=$(dirname "$script_absolute") desired_directory=$(realpath "$script_directory"/..) if [ "$PWD" != "$desired_directory" ]; then echo "Changing to project directory..." cd "$desired_directory" fi echo "Activating venv..." source ./venv/bin/activate echo "Applying migrations..." ./manage.py migrate ./manage.py createsuperuser