Files
git.taskfile.build/bin/create-env
T
Janik von Rotz d960b43ca2 feat(task): use environment variables in create-env for odoo and nextcloud configurations
- Replace hardcoded values with environment variables in odoo and nextcloud sections
- Update NEXTCLOUD_PASSWORD to use placeholder syntax for security
- Maintain consistent formatting and structure with existing code
- No functional changes, improves configurability and security
2025-12-02 08:04:05 +01:00

49 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
create-env() {
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
if [[ -z "$2" ]]; then echo "\$1 is empty."; exit; fi
TASK_DOTENV_DIR=${TASK_DOTENV_DIR:="$HOME/.config/taskfile.build"}
init-dotenv-dir
local env_filepath="$TASK_DOTENV_DIR/.env.$1"
if [[ -f "$env_filepath" ]]; then
echo "Env file already exists: $env_filepath"
exit 1
fi
echo "Init env file: $env_filepath"