V8.13.400.2025.11.08
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m7s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-11-09 16:42:30 +01:00
parent ad2456eb66
commit ebf351fa43
8 changed files with 348 additions and 32 deletions

View File

@@ -165,7 +165,7 @@ genstring() {
#######################################
scurl() {
if [[ $# -ne 2 ]]; then
printf "%s❌ Error: Usage: scurl <URL> <path/to/file>. %s%s" "${CRED}" "${CRES}" "${NL}" >&2
printf "%b❌ Error: Usage: scurl <URL> <path/to/file>. %b%b" "${CRED}" "${CRES}" "${NL}" >&2
return 1
fi
declare url="$1"
@@ -177,7 +177,7 @@ scurl() {
-o "${output_path}" \
"${url}"
then
printf "%s❌ Error: Download failed for URL: '%s'. %s%s" "${CRED}" "${url}" "${CRES}" "${NL}" >&2
printf "%b❌ Error: Download failed for URL: '%s'. %b%b" "${CRED}" "${url}" "${CRES}" "${NL}" >&2
return 2
fi
return 0
@@ -199,7 +199,7 @@ scurl() {
#######################################
swget() {
if [[ $# -ne 2 ]]; then
printf "%s❌ Error: Usage: swget <URL> <path/to/file>. %s%s" "${CRED}" "${CRES}" "${NL}" >&2
printf "%b❌ Error: Usage: swget <URL> <path/to/file>. %b%b" "${CRED}" "${CRES}" "${NL}" >&2
return 1
fi
declare url="$1"
@@ -212,7 +212,7 @@ swget() {
-qO "${output_path}" \
"${url}"
then
printf "%s❌ Error: Download failed for URL: '%s'. %s%s" "${CRED}" "${url}" "${CRES}" "${NL}" >&2
printf "%b❌ Error: Download failed for URL: '%s'. %b%b" "${CRED}" "${url}" "${CRES}" "${NL}" >&2
return 2
fi
return 0
@@ -270,7 +270,7 @@ trel() {
#######################################
whichpackage() {
if ! command -v "$1" >/dev/null 2>&1; then
printf '%s❌ Error: Program '%s' not found. %s%s' "${CRED}" "$1" "${CRES}" "${NL}" >&2
printf '%b❌ Error: Program '%s' not found. %b%b' "${CRED}" "$1" "${CRES}" "${NL}" >&2
exit 1
fi
# shellcheck disable=SC2230,SC2312