- Replace all instances of `TASK_CONFIG_DIR` with `TASK_DOTENV_DIR` across environment-related scripts - Update `init-config-dir` function name to `init-dotenv-dir` for consistency - Adjust documentation and help table entries to reflect the renamed variable and function - Maintain existing functionality and code style throughout affected scripts
11 lines
354 B
Bash
Executable File
11 lines
354 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
copy-env() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
if [[ -z "$2" ]]; then echo "\$2 is empty."; exit; fi
|
|
TASK_DOTENV_DIR=${TASK_DOTENV_DIR:="$HOME/.config/taskfile.build"}
|
|
local source_env="$TASK_DOTENV_DIR/.env.$1"
|
|
local target_env="$TASK_DOTENV_DIR/.env.$2"
|
|
cp "$source_env" "$target_env"
|
|
}
|