installer messages fit 80 columns
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
d9470bbfe1
commit
4542fa6c99
+3
-3
@@ -42,7 +42,7 @@ blank() { printf '\n' >&2; }
|
|||||||
good() { out " ${GREEN}${OK}${R} $*"; }
|
good() { out " ${GREEN}${OK}${R} $*"; }
|
||||||
note() { out " ${D}$*${R}"; }
|
note() { out " ${D}$*${R}"; }
|
||||||
warn() { out " ${AMBER}!${R} $*"; }
|
warn() { out " ${AMBER}!${R} $*"; }
|
||||||
die() { blank; out " ${RED}${NO}${R} ${B}$*${R}"; blank; exit 1; }
|
die() { blank; out " ${RED}${NO}${R} ${B}$1${R}"; shift; for more in "$@"; do out " $more"; done; blank; exit 1; }
|
||||||
rule() { out "${D}${HR}${R}"; }
|
rule() { out "${D}${HR}${R}"; }
|
||||||
step() { blank; out "${AMBER}${B}$1${R} ${B}$2${R}"; [ -z "${3:-}" ] || note "$3"; blank; }
|
step() { blank; out "${AMBER}${B}$1${R} ${B}$2${R}"; [ -z "${3:-}" ] || note "$3"; blank; }
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ if [ -f "$tmp/SHA256SUMS" ] && command -v sha256sum >/dev/null 2>&1; then
|
|||||||
want=$(awk -v f="$file" '$2 == f || $2 == "*" f { print $1 }' "$tmp/SHA256SUMS")
|
want=$(awk -v f="$file" '$2 == f || $2 == "*" f { print $1 }' "$tmp/SHA256SUMS")
|
||||||
got=$(sha256sum "$tmp/hamlab" | awk '{ print $1 }')
|
got=$(sha256sum "$tmp/hamlab" | awk '{ print $1 }')
|
||||||
[ -n "$want" ] || die "SHA256SUMS has no entry for $file."
|
[ -n "$want" ] || die "SHA256SUMS has no entry for $file."
|
||||||
[ "$want" = "$got" ] || die "Checksum mismatch for $file: this is not the file that was published. Nothing was installed."
|
[ "$want" = "$got" ] || die "Checksum mismatch for $file." "This is not the file that was published. Nothing was installed."
|
||||||
good "checksum matches SHA256SUMS"
|
good "checksum matches SHA256SUMS"
|
||||||
else
|
else
|
||||||
warn "no SHA256SUMS (or no sha256sum here): the download was not verified"
|
warn "no SHA256SUMS (or no sha256sum here): the download was not verified"
|
||||||
@@ -344,7 +344,7 @@ out " ${GREEN}${B}${OK} Ham Lab $("$hamlab_bin" version 2>/dev/null | awk '{ pr
|
|||||||
blank
|
blank
|
||||||
row() { out " $(printf '%-10s' "$1") $2"; [ -z "${3:-}" ] || out " ${D}$3${R}"; }
|
row() { out " $(printf '%-10s' "$1") $2"; [ -z "${3:-}" ] || out " ${D}$3${R}"; }
|
||||||
if [ "$init" = none ]; then
|
if [ "$init" = none ]; then
|
||||||
row "start it" "${B}hamlab serve${R}" "as ${run_as:-its user}, under your own supervisor: nothing here starts it at boot"
|
row "start it" "${B}hamlab serve${R}" "as ${run_as:-its user}, under your own supervisor: nothing starts it at boot"
|
||||||
fi
|
fi
|
||||||
if [ -n "$listen" ]; then
|
if [ -n "$listen" ]; then
|
||||||
row "open" "${CYAN}${B}$scheme://$(printf '%s' "$listen" | sed "s/^0\.0\.0\.0/$url_host/")${R}"
|
row "open" "${CYAN}${B}$scheme://$(printf '%s' "$listen" | sed "s/^0\.0\.0\.0/$url_host/")${R}"
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ func Install(args []string, version string) error {
|
|||||||
url := scheme + "://" + browseAddr(cfg.Listen)
|
url := scheme + "://" + browseAddr(cfg.Listen)
|
||||||
switch {
|
switch {
|
||||||
case initSys == "":
|
case initSys == "":
|
||||||
say("\nNo systemd or OpenRC here, so nothing starts it at boot. Run it under your supervisor as %s:\n HAMLAB_CONFIG=%s %s serve", acct.name, cfgPath, dest)
|
say("\nNo systemd or OpenRC here, so nothing starts it at boot.\nRun it under your own supervisor, as %s:\n HAMLAB_CONFIG=%s %s serve", acct.name, cfgPath, dest)
|
||||||
case o.noStart:
|
case o.noStart:
|
||||||
case healthy(cfg.Listen, cfg.TLS == "auto"):
|
case healthy(cfg.Listen, cfg.TLS == "auto"):
|
||||||
say("\nHam Lab is up: %s", url)
|
say("\nHam Lab is up: %s", url)
|
||||||
|
|||||||
Reference in New Issue
Block a user