mirror of
https://github.com/Cheviiot/Nivora.git
synced 2026-08-03 15:51:12 +00:00
feat: create autonomous Nivora package repository
Maintain a validated cross-distribution package catalog. Automate upstream updates, isolated builds, diagnostics, and direct publication. Build the official GitHub Desktop sources for Linux with working OAuth.
This commit is contained in:
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
optional_refresh() {
|
||||
local label=$1
|
||||
shift
|
||||
|
||||
if ! "$@"; then
|
||||
echo "Предупреждение: не удалось обновить ${label}." >&2
|
||||
fi
|
||||
}
|
||||
|
||||
unit=/usr/lib/systemd/system/happd.service
|
||||
if [[ ! -e "$unit" ]] && command -v systemctl >/dev/null 2>&1 && [[ -d /run/systemd/system ]]; then
|
||||
if systemctl is-active --quiet happd.service; then
|
||||
systemctl stop happd.service
|
||||
fi
|
||||
if systemctl is-enabled --quiet happd.service; then
|
||||
systemctl disable happd.service
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
# Обновляем MIME-базу данных
|
||||
if command -v update-mime-database &>/dev/null; then
|
||||
optional_refresh "MIME-базу" update-mime-database /usr/share/mime
|
||||
fi
|
||||
|
||||
# Обновляем desktop базу данных
|
||||
if command -v update-desktop-database &>/dev/null; then
|
||||
optional_refresh "desktop-базу" update-desktop-database -q /usr/share/applications
|
||||
fi
|
||||
|
||||
# Обновляем кэш иконок
|
||||
if command -v gtk-update-icon-cache &>/dev/null; then
|
||||
optional_refresh "кэш иконок" gtk-update-icon-cache -f -q /usr/share/icons/hicolor
|
||||
fi
|
||||
Reference in New Issue
Block a user