Quick update

This commit is contained in:
2025-05-13 06:40:48 -07:00
parent fae93cac6c
commit 62965f6c1d
5 changed files with 73 additions and 12 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.deb

View File

@@ -10,6 +10,7 @@ PKG_SIZE=$(du -sk "$PKG_DIR" | cut -f1)
sed -i "/^Installed-Size:/c\Installed-Size: $PKG_SIZE" "$PKG_DIR/DEBIAN/control"
# Build the .deb package
dpkg-deb --build "$PKG_DIR" ./chillcraftos-plymouth-theme.deb
mkdir -p ./build
dpkg-deb --build "$PKG_DIR" ./build/chillcraftos-plymouth-theme.deb
echo "Package built with Installed-Size: $PKG_SIZE KB"

View File

@@ -1,10 +1,10 @@
Package: chillcraftos-plymouth-theme
Version: 1.0
Version: 1.1
Maintainer: Seth Olivarez <contact@oxmc.me>
Section: metapackages
Priority: required
Architecture: all
Section: x11
Priority: optional
Architecture: arm64
Depends: plymouth
Installed-Size: 228
Installed-Size: 232
Description: Default plymouth theme for ChillcraftOS
This package contains the default plymouth theme for ChillcraftOS.

View File

@@ -1,11 +1,35 @@
#!/bin/bash
#!/bin/sh
# postinst script for chillcraftos-splash
set -e
# Set the plymouth theme
plymouth-set-default-theme chillcraftos
update_cmdline() {
local cmdline="$1"
[ -e "$cmdline" ] || return
# Update the initramfs
echo "Updating initramfs..."
update-initramfs -u
sed -i "$cmdline" \
-e '/\bquiet\b/! s/$/ quiet/' \
-e '/\bsplash\b/! s/$/ splash/' \
-e '/plymouth.ignore-serial-consoles/! s/$/ plymouth.ignore-serial-consoles/'
}
case "$1" in
configure)
if [ -z "$2" ] || grep -qw splash /proc/cmdline; then
command -v plymouth-set-default-theme >/dev/null && plymouth-set-default-theme -R chillcraftos
if systemctl get-default | grep -q graphical; then
FW_LOC="$(/usr/lib/raspberrypi-sys-mods/get_fw_loc)"
CMDLINE="$FW_LOC/cmdline.txt"
update_cmdline "$CMDLINE"
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0

35
splash/DEBIAN/prerm Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
# prerm script for chillcraftos-splash
set -e
cleanup_cmdline() {
local cmdline="$1"
[ -e "$cmdline" ] || return
sed -i "$cmdline" \
-e 's/ quiet//' \
-e 's/ splash//' \
-e 's/ plymouth.ignore-serial-consoles//'
}
case "$1" in
remove|deconfigure)
if command -v plymouth-set-default-theme >/dev/null; then
PTHEME="$(plymouth-set-default-theme)"
if [ "$PTHEME" = "chillcraftos" ]; then
FW_LOC="$(/usr/lib/raspberrypi-sys-mods/get_fw_loc)"
CMDLINE="$FW_LOC/cmdline.txt"
cleanup_cmdline "$CMDLINE"
fi
fi
;;
upgrade|failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0