Scripts: Update success and error messages

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-29 09:47:29 +02:00
parent 8a7c61f467
commit 3e14eed7d7
6 changed files with 28 additions and 25 deletions

View File

@@ -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

View File

@@ -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 != "" {

View File

@@ -6,6 +6,9 @@ const (
Yes = "Yes"
No = "No"
NotAssigned = "n/a"
CheckMark = "✅"
CrossMark = "❌"
Check = "✅"
Cross = "❌"
Star = "⭐"
Robot = "🤖"
Package = "📦"
)

View File

@@ -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()
{

View File

@@ -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

View File

@@ -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