From 3e14eed7d7c5e70c94b67640312f33e1aab1df75 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Mon, 29 Sep 2025 09:47:29 +0200 Subject: [PATCH] Scripts: Update success and error messages Signed-off-by: Michael Mayer --- Makefile | 4 ++-- internal/config/test.go | 4 ++-- pkg/txt/report/const.go | 7 +++++-- scripts/dist/create-users.sh | 20 ++++++++++---------- scripts/dist/install-libheif.sh | 2 +- scripts/dist/install-tensorflow.sh | 16 ++++++++-------- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 436052d7a..59c5a4889 100644 --- a/Makefile +++ b/Makefile @@ -245,7 +245,7 @@ dep-list: go list -u -m -json all | go-mod-outdated -direct npm: dep-npm npm-version npm-version: - @echo "✅ Installed npm $$(npm --version)" + @echo "📦 Installed npm $$(npm --version)." dep-npm: @echo "Installing NPM package manager..." @if command -v sudo >/dev/null 2>&1; then \ @@ -259,7 +259,7 @@ dep-js: (cd frontend && npm ci --ignore-scripts --no-update-notifier --no-audit) codex: dep-codex codex-version codex-version: - @echo "✅ Installed $$(codex --version)" + @echo "🤖 Installed $$(codex --version)." dep-codex: @echo "Installing Codex CLI..." @[ -n "$(CODEX_HOME)" ] && [ "$(CODEX_HOME)" != "/" ] && install -d -m 700 -- "$(CODEX_HOME)" || true diff --git a/internal/config/test.go b/internal/config/test.go index 0b4c9a3e9..5a41230cf 100644 --- a/internal/config/test.go +++ b/internal/config/test.go @@ -530,12 +530,12 @@ func (c *Config) AssertTestData(t *testing.T) { t.Logf("testdata: dir %s exists (%s)", clean.Log(dir), report.Bool(fs.DirIsEmpty(dir), "empty", "not empty")) } else { - t.Logf("testdata: dir %s is missing %s, but required", clean.Log(dir), report.CrossMark) + t.Logf("testdata: dir %s is missing %s, but required", clean.Log(dir), report.Cross) } } reportErr := func(funcName string) { - t.Errorf("testdata: *Config.%s() must not return an empty string %s", funcName, report.CrossMark) + t.Errorf("testdata: *Config.%s() must not return an empty string %s", funcName, report.Cross) } if dir := c.AssetsPath(); dir != "" { diff --git a/pkg/txt/report/const.go b/pkg/txt/report/const.go index a6b3fd70d..1e2bea614 100644 --- a/pkg/txt/report/const.go +++ b/pkg/txt/report/const.go @@ -6,6 +6,9 @@ const ( Yes = "Yes" No = "No" NotAssigned = "n/a" - CheckMark = "✅" - CrossMark = "❌" + Check = "✅" + Cross = "❌" + Star = "⭐" + Robot = "🤖" + Package = "📦" ) diff --git a/scripts/dist/create-users.sh b/scripts/dist/create-users.sh index e5d0f6afd..6971ae3ee 100755 --- a/scripts/dist/create-users.sh +++ b/scripts/dist/create-users.sh @@ -12,29 +12,29 @@ echo "Creating default users and groups..." # create groups 'www-data', 'video', 'davfs2', and 'render' groupadd -f -r -g 33 www-data 1>&2 -echo "✅ added group www-data (33)" +echo "✅ Added group www-data (33)." groupadd -f -r -g 44 video 1>&2 -echo "✅ added group video (44)" +echo "✅ Added group video (44)." groupadd -f -r -g 105 davfs2 1>&2 -echo "✅ added group davfs2 (105)" +echo "✅ Added group davfs2 (105)." groupadd -f -r -g 109 renderd 1>&2 -echo "✅ added group renderd (109)" +echo "✅ Added group renderd (109)." groupadd -f -r -g 115 render 1>&2 -echo "✅ added group render (115)" +echo "✅ Added group render (115)." groupadd -f -r -g 116 ssl-cert 1>&2 -echo "✅ added group ssl-cert (116)" +echo "✅ Added group ssl-cert (116)." # create group 'videodriver' groupdel -f 937 >/dev/null 2>&1 groupadd -f -r -g 937 videodriver 1>&2 -echo "✅ added group videodriver (937)" +echo "✅ Added group videodriver (937)." # create group 'photoprism' groupdel -f ubuntu >/dev/null 2>&1 groupdel -f photoprism >/dev/null 2>&1 groupdel -f 1000 >/dev/null 2>&1 groupadd -f -g 1000 photoprism 1>&2 -echo "✅ added group photoprism (1000)" +echo "✅ Added group photoprism (1000)." # add existing www-data user to groups usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-data @@ -42,14 +42,14 @@ usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-da # create user 'videodriver' userdel -r -f videodriver >/dev/null 2>&1 useradd -u 937 -r -N -g 937 -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert -s /bin/bash -m -d "/home/videodriver" videodriver -echo "✅ added user videodriver (937)" +echo "✅ Added user videodriver (937)." # create user 'photoprism' userdel -r -f ubuntu >/dev/null 2>&1 userdel -r -f photoprism >/dev/null 2>&1 userdel -r -f 1000 >/dev/null 2>&1 useradd -u 1000 -N -g photoprism -G www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/photoprism" photoprism -echo "✅ added user photoprism (1000)" +echo "✅ Added user photoprism (1000)." add_user() { diff --git a/scripts/dist/install-libheif.sh b/scripts/dist/install-libheif.sh index 294395270..77fe86bf2 100755 --- a/scripts/dist/install-libheif.sh +++ b/scripts/dist/install-libheif.sh @@ -76,7 +76,7 @@ echo "-------------------------------------------------------------------------- if curl -fsSL "$URL" | tar --overwrite --mode=755 -xz -C "$DESTDIR" 2> /dev/null; then echo "✅ Extracted \"$URL\" to \"$DESTDIR\"" else - echo "❌ libheif binaries are not yet available for this architecture or distribution" + echo "❌ No libheif binaries are available for this architecture or distribution." exit 0 fi diff --git a/scripts/dist/install-tensorflow.sh b/scripts/dist/install-tensorflow.sh index 8eefc3d72..f6c6d7259 100755 --- a/scripts/dist/install-tensorflow.sh +++ b/scripts/dist/install-tensorflow.sh @@ -68,28 +68,28 @@ if [[ $TF_DRIVER == "auto" ]]; then if [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx512_vnni') == "true" ]]; then TF_DRIVER="avx512" - echo "✅ Your CPU supports AVX512-VNNI Vector Neural Network Instructions" + echo "✅ Your CPU supports AVX512-VNNI Vector Neural Network Instructions." if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then - echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected" + echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected." fi elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx_vnni') == "true" ]]; then TF_DRIVER="vnni" - echo "✅ Your CPU supports AVX-VNNI Vector Neural Network Instructions" + echo "✅ Your CPU supports AVX-VNNI Vector Neural Network Instructions." if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then - echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected" + echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected." fi elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx2') == "true" ]]; then TF_DRIVER="avx2" - echo "✅ Your CPU supports AVX2 vector instructions" + echo "✅ Your CPU supports AVX2 vector instructions." elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx') == "true" ]]; then TF_DRIVER="avx" - echo "✅ Your CPU supports AVX vector instructions" + echo "✅ Your CPU supports AVX vector instructions." elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.ssse3') == "true" ]]; then TF_DRIVER="ssse3" - echo "✅ Your CPU supports SSSE3 instructions" + echo "✅ Your CPU supports SSSE3 instructions." else TF_DRIVER="" - echo "❌ Your CPU does not support any AVX instructions" + echo "❌ Your CPU does not support any AVX instructions." fi fi