chore: reduce commentary

This commit is contained in:
Jamie Albert
2025-10-31 18:53:10 +00:00
parent b59bf1fe8a
commit 146ca6a7c7

View File

@@ -10,13 +10,6 @@
# ---
set -euo pipefail
# ---
# @usage: error <exit_code> <message>
# @description: Print an error message to stderr and exit with a specific code.
# @arg: $1 - The exit code to use.
# @arg: $* - The error message to print.
# @return_code: [N] The specified exit code.
# ---
error() {
declare error_msg exit_code="$1"
shift
@@ -25,10 +18,6 @@ error() {
exit "${exit_code}"
}
# ---
# @description: Print an informational message to stdout.
# @arg: $* - The message to print.
# ---
info() {
declare info_msg
printf -v info_msg '%s\n' "$*"
@@ -36,7 +25,6 @@ info() {
}
# ---
# @description: Load the jade configuration file.
# @return_code: [2] Unable to source.
# shellcheck source=/usr/local/etc/jade.sh/jade.conf
# shellcheck disable=2015
@@ -47,10 +35,6 @@ setup() {
}
# ---
# @description: Download a remote file to the local path.
# @global: REMOTE_HOST - The remote host to connect to.
# @global: REMOTE_PATH - The path to the file on the remote host.
# @global: LOCAL_PATH - The local path to save the file to.
# @return_code: [3] Download failed.
# ---
download_file() {
@@ -59,10 +43,6 @@ download_file() {
}
# ---
# @description: Upload a local file to the remote host, backing up the remote file first.
# @global: REMOTE_HOST - The remote host to connect to.
# @global: REMOTE_PATH - The path to the file on the remote host.
# @global: LOCAL_PATH - The local path of the file to upload.
# @return_code: [4] Local file missing.
# @return_code: [5] Failed to create remote backup.
# @return_code: [6] Upload failed.
@@ -76,11 +56,6 @@ upload_file() {
}
# ---
# @description: Download a file and open it in the configured editor.
# @global: REMOTE_HOST - The remote host to connect to.
# @global: REMOTE_PATH - The path to the file on the remote host.
# @global: LOCAL_PATH - The local path to save the file to.
# @global: EDITOR - The editor command to use.
# @return_code: [7] Editor command not found.
# @return_code: [3] Download failed (inherited from download_file).
# ---
@@ -93,9 +68,6 @@ edit_file() {
}
# ---
# @description: Upload a file and run 'docker compose up -d' on the remote host.
# @global: REMOTE_HOST - The remote host to connect to.
# @global: REMOTE_PATH - The path to the docker-compose.yml file on the remote host.
# @return_code: [6] Upload failed (inherited from upload_file).
# @return_code: [8] Remote docker compose up failed.
# ---
@@ -108,9 +80,6 @@ upload_compose() {
}
# ---
# @description: Run 'docker compose down', upload a file, then run 'docker compose up -d' on the remote host.
# @global: REMOTE_HOST - The remote host to connect to.
# @global: REMOTE_PATH - The path to the docker-compose.yml file on the remote host.
# @return_code: [9] Remote docker compose down failed.
# @return_code: [6] Upload failed (inherited from upload_file).
# @return_code: [11] Remote docker compose up failed during restart.
@@ -127,9 +96,6 @@ upload_restart() {
}
# ---
# @description: Parse command-line flags and execute the chosen mode.
# @arg: $@ - Command-line arguments.
# @return_code: [2] Configuration file not found (inherited from setup).
# @return_code: [10] Unknown command-line option.
# @return_code: [12] Required tool 'scp' not found.
# @return_code: [13] Required tool 'ssh' not found.