Add initial scripts and project conventions

This commit is contained in:
dido committed 2026-09-27 12:09:46 +03:00
1 parent af9f32facc
commit c777cf115b
14 files changed
+982 -9

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# <script-name>.sh — <one-line description of what this script does>
#
# Full documentation: see <script-name>.md in this same folder.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=lib/common.sh
# Adjust the relative depth below to match this script's folder nesting
# relative to lib/ — e.g. "../../lib/common.sh" if the script is two
# folders deep from the repo root.
source "${SCRIPT_DIR}/../lib/common.sh"
SCRIPT_HELP=$(cat <<'HELP'
Usage: <script-name>.sh [OPTIONS]
<One paragraph explaining what the script does and when to use it.>
Options:
-h, --help Show this help message and exit
<-x, --example> <describe other options here>
Examples:
./<script-name>.sh
./<script-name>.sh --example value
HELP
)
# --help must be checked before any other argument parsing.
common::show_help_if_requested "$@"
# --- Argument parsing (if the script takes options) ---
# TODO: parse "$@" here if needed. Use common::die for invalid arguments,
# not a raw echo+exit, so error formatting stays consistent.
# --- Script logic ---
common::log "Starting <script-name>..."
# TODO: actual script logic goes here.
common::log "Done."