fix(moonarch-git): migrate cliphist.service to split text/image services

pre_upgrade hook removes old cliphist.service symlinks before the
package replaces it with cliphist-text and cliphist-image services.
This commit is contained in:
nevaforget 2026-04-08 11:46:29 +02:00
parent fb3f668b66
commit 0abdf15624

View File

@ -88,6 +88,16 @@ pre_upgrade() {
if [ -d /etc/xdg/walker/themes/moonarch ] && ! pacman -Qo /etc/xdg/walker/themes/moonarch/style.css &>/dev/null; then
rm -rf /etc/xdg/walker/themes/moonarch
fi
# Migrate cliphist.service → cliphist-text + cliphist-image
if [ -f /etc/systemd/user/cliphist.service ]; then
while IFS=: read -r _ _ uid _ _ home _; do
if [ "$uid" -ge 1000 ] && [ "$uid" -lt 60000 ] && [ -d "$home" ]; then
rm -f "$home/.config/systemd/user/graphical-session.target.wants/cliphist.service" 2>/dev/null || true
fi
done < /etc/passwd
rm -f /etc/systemd/user/graphical-session.target.wants/cliphist.service 2>/dev/null || true
fi
}
post_upgrade() {