- Expand AGENTS.md with general agent guidance and coding conventions - Refactor bash snippets in README.md and scripts to align with style guide: - Use `#!/usr/bin/env bash` shebang for portability - Remove `function` keyword from definitions - Replace `[ ]` conditionals with `[[ ]]` for improved reliability - Rename local variables to lowercase with `local` keyword - Introduce CHANGELOG.md to track project changes per Keep a Changelog spec - Update taskfile.build scripts to follow consistent bash practices
13 lines
343 B
Bash
Executable File
13 lines
343 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
restore-env-files() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
|
|
TASK_CONFIG_DIR=${TASK_CONFIG_DIR:-$HOME/.config/taskfile.build}
|
|
local backup_filepath="$1"
|
|
|
|
echo "Restore env files from: $backup_filepath"
|
|
mkdir -p "$TASK_CONFIG_DIR"
|
|
tar -xzf "$backup_filepath" -C "$TASK_CONFIG_DIR"
|
|
}
|