#!/bin/sh
# Rewrite /usr/lib/os-release from /etc/mood/release (Moodtop branding over Debian; base-files' copy is diverted).
# Run by the image build and by the moodtop-core package on every upgrade.
set -e
. /etc/mood/release
if ! dpkg-divert --list /usr/lib/os-release | grep -q moodtop; then
  dpkg-divert --package moodtop --rename --divert /usr/lib/os-release.debian --add /usr/lib/os-release
fi
cat > /usr/lib/os-release <<O
PRETTY_NAME="Moodtop OS ${MOOD_VERSION} (${MOOD_CODENAME})"
NAME="Moodtop OS"
VERSION_ID="${MOOD_VERSION}"
VERSION="${MOOD_VERSION} (${MOOD_CODENAME})"
VERSION_CODENAME=trixie
ID=moodtop
ID_LIKE=debian
HOME_URL="https://zandy.zo.space/moodtop"
SUPPORT_URL="https://github.com/ZapGaming/os"
BUG_REPORT_URL="https://github.com/ZapGaming/os/issues"
LOGO=mood-logo
O
ln -sf ../usr/lib/os-release /etc/os-release
printf 'Moodtop OS %s \\n \\l\n\n' "$MOOD_VERSION" > /etc/issue
