- 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
13 lines
345 B
Bash
Executable File
13 lines
345 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
restore-env-files() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
TASK_DOTENV_DIR=${TASK_DOTENV_DIR:="$HOME/.config/taskfile.build"}
|
|
|
|
local backup_filepath="$1"
|
|
|
|
echo "Restore env files from: $backup_filepath"
|
|
mkdir -p "$TASK_DOTENV_DIR"
|
|
tar -xzf "$backup_filepath" -C "$TASK_DOTENV_DIR"
|
|
}
|