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
This commit is contained in:
Janik von Rotz committed 2025-10-29 12:32:51 +01:00
1 parent cb0f9330af
commit 5b992d4ee0
25 files changed
+386 -322

No files matched your search

+10 -10
View File
@@ -1,19 +1,19 @@
#!/bin/bash
#!/usr/bin/env bash
function create-nextcloud-env() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
create-nextcloud-env() {
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
init-config-dir
ENV_FILEPATH="$TASK_CONFIG_DIR/.env.$1"
if [ -f "$ENV_FILEPATH" ]; then
echo "Env file already exists: $ENV_FILEPATH"
local env_filepath="$TASK_CONFIG_DIR/.env.$1"
if [[ -f "$env_filepath" ]]; then
echo "Env file already exists: $env_filepath"
exit 1
fi
echo "Init env file: $ENV_FILEPATH"
echo "NEXTCLOUD_URL=" > "$ENV_FILEPATH"
echo "NEXTCLOUD_USERNAME=" >> "$ENV_FILEPATH"
echo "NEXTCLOUD_PASSWORD=" >> "$ENV_FILEPATH"
echo "Init env file: $env_filepath"
echo "NEXTCLOUD_URL=" > "$env_filepath"
echo "NEXTCLOUD_USERNAME=" >> "$env_filepath"
echo "NEXTCLOUD_PASSWORD=" >> "$env_filepath"
echo "Edit with: task edit-env $1"
}