mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 11:51:10 -05:00
Configure PostgreSQL with PostGIS support
- 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
This commit is contained in:
43
test-args.sh
Executable file
43
test-args.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user