chore: add docstrings to feat/dfm (#84)

Docstrings generation was requested by @ivuorinen.

* https://github.com/ivuorinen/dotfiles/pull/59#issuecomment-2564381679

The following files were modified:

* `local/dfm/cmd/install.sh`
* `local/dfm/lib/common.sh`
* `local/dfm/lib/utils.sh`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
coderabbitai[bot]
2025-05-03 08:14:18 +03:00
committed by Ismo Vuorinen
parent 35e812baa2
commit 066b38926a
3 changed files with 628 additions and 30 deletions

62
local/dfm/cmd/install.sh Executable file → Normal file
View File

@@ -4,7 +4,27 @@
# @author Ismo Vuorinen <https://github.com/ivuorinen>
# @license MIT
# @description Install all packages in the correct order
# Installs all required packages in the correct order.
#
# Description:
# Orchestrates the installation process for the dotfile manager by sequentially invoking
# the installation routines for fonts, Homebrew, and Rust (cargo). It logs the start of the
# overall installation process before calling each respective function.
#
# Globals:
# lib::log - Function used to log installation progress messages.
#
# Arguments:
# None.
#
# Outputs:
# Logs an informational message indicating the start of the installation process.
#
# Returns:
# None.
#
# Example:
# all
function all()
{
lib::log "Installing all packages..."
@@ -13,7 +33,22 @@ function all()
cargo
}
# @description Install fonts
# Installs fonts required by the dotfile manager.
#
# Globals:
# None.
#
# Arguments:
# None.
#
# Outputs:
# Logs a message to STDOUT indicating that the font installation process has started.
#
# Returns:
# None.
#
# Example:
# fonts
function fonts()
{
lib::log "Installing fonts..."
@@ -22,14 +57,33 @@ function fonts()
# Install Homebrew and set it up.
#
# @description Installs Homebrew
# Installs the Homebrew package manager on macOS.
#
# Globals:
# lib::log - Logging utility used to report installation progress.
#
# Outputs:
# Logs a message indicating the start of the Homebrew installation process.
#
# Example:
# brew
function brew()
{
lib::log "Installing Homebrew..."
# implement Homebrew installation
}
# @description Install Rust and cargo packages.
# Installs Rust and cargo packages.
#
# Description:
# Logs the start of the installation process for Rust and cargo packages.
# The installation logic is intended to be implemented where indicated.
#
# Globals:
# Uses lib::log for logging the installation process.
#
# Example:
# cargo
function cargo()
{
lib::log "Installing Rust and cargo packages..."