Files
git.taskfile.build/bin/copy-env
T
Janik von Rotz 5b992d4ee0 docs(agents): refine bash guidelines and update code samples
- 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
2025-10-29 12:32:51 +01:00

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_CONFIG_DIR=${TASK_CONFIG_DIR:="$HOME/.config/taskfile.build"}
local source_env="$TASK_CONFIG_DIR/.env.$1"
local target_env="$TASK_CONFIG_DIR/.env.$2"
cp "$source_env" "$target_env"
}