45 lines
1.2 KiB
Bash
Executable File
45 lines
1.2 KiB
Bash
Executable File
#!/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."
|