Files
git.taskfile.build/bin/backup-env-files
T
Janik von Rotz cb0f9330af docs(agents): add bash style guide and update README style section
- Create new AGENTS.md with comprehensive bash scripting guidelines
- Update README.md to reference the bash style guide
2025-10-29 08:14:12 +01:00

13 lines
384 B
Bash
Executable File

#!/usr/bin/env bash
backup-env-files() {
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit 1; fi
local task_config_dir=${TASK_CONFIG_DIR:-$HOME/.config/taskfile.build}
local backup_filepath="$1/$(date +'%Y-%m-%d')-backup-env-files.tar.gz"
echo "Backing up env files to: $backup_filepath"
cd "$task_config_dir" || exit 1
tar -czf "$backup_filepath" .env.*
}