mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:51:09 -05:00
- Updated database settings to use dj_database_url for environment-based configuration - Added dj-database-url dependency - Configured PostGIS backend for spatial data support - Set default DATABASE_URL for production PostgreSQL connection
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Parse options FIRST
|
|
echo "DEBUG: Arguments received: $@"
|
|
echo "DEBUG: Number of arguments: $#"
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
echo "DEBUG: Processing argument: $1"
|
|
case "$1" in
|
|
--non-interactive)
|
|
export NON_INTERACTIVE="true"
|
|
echo "DEBUG: NON_INTERACTIVE set to $NON_INTERACTIVE"
|
|
shift
|
|
;;
|
|
--debug)
|
|
export CONFIG_DEBUG="true"
|
|
echo "DEBUG: CONFIG_DEBUG set to $CONFIG_DEBUG"
|
|
shift
|
|
;;
|
|
-*)
|
|
echo "Unknown option: $1"
|
|
exit 1
|
|
;;
|
|
*)
|
|
# This is the command - stop parsing options
|
|
echo "DEBUG: Found command argument: $1, breaking"
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# NOW set the command after options are parsed
|
|
local_command="${1:-setup}"
|
|
echo "DEBUG: Command is: $local_command"
|
|
echo "DEBUG: NON_INTERACTIVE is: ${NON_INTERACTIVE:-unset}"
|
|
echo "DEBUG: CONFIG_DEBUG is: ${CONFIG_DEBUG:-unset}"
|
|
|
|
# Test the conditional logic
|
|
if [[ "$NON_INTERACTIVE" != "true" ]]; then
|
|
echo "WOULD SHOW: Interactive banner and prompt"
|
|
else
|
|
echo "WOULD SKIP: Interactive banner and prompt (non-interactive mode)"
|
|
fi |