try fixing 0
Some checks failed
PikaOS Package Build & Release (amd64-v3) / build (push) Has been cancelled

This commit is contained in:
Ward from fusion-voyager-3 2024-12-11 00:51:09 +03:00
parent 3ebc9b43cc
commit c4ab6062f9
4 changed files with 18 additions and 9 deletions

View File

@ -1 +1 @@
2 3

View File

@ -1,4 +1,4 @@
pika-refind-btrfs-hooks (1.0-101pika1) pika; urgency=medium pika-refind-btrfs-hooks (1.0-101pika2) pika; urgency=medium
* Initial release. * Initial release.

View File

@ -12,5 +12,9 @@ Depends:
${misc:Depends}, ${misc:Depends},
linux-base, linux-base,
refind, refind,
refind-btrfs,
snapper,
booster, booster,
Recommends:
apt-btrfs-snapper,
Description: refind-btrfs stanza generation hooks for PikaOS. Description: refind-btrfs stanza generation hooks for PikaOS.

View File

@ -4,6 +4,11 @@ set -e
export EFI_PATH=/boot/efi export EFI_PATH=/boot/efi
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
if [[ -f $EFI_PATH/EFI/refind/refind.conf ]] if [[ -f $EFI_PATH/EFI/refind/refind.conf ]]
then then
export DO_STANDARD_REFIND_PATH=true export DO_STANDARD_REFIND_PATH=true
@ -25,23 +30,23 @@ fi
create_entries() { create_entries() {
REFIND_PATH="$1" REFIND_PATH="$1"
echo "Installing theme to: $REFIND_PATH"
grep -qxF 'include pika-refind-btrfs.conf' $EFI_PATH/$REFIND_PATH/refind.conf || echo 'include pika-refind-btrfs.conf' >> $EFI_PATH/$REFIND_PATH/refind.conf grep -qxF 'include pika-refind-btrfs.conf' $EFI_PATH/$REFIND_PATH/refind.conf || echo 'include pika-refind-btrfs.conf' >> $EFI_PATH/$REFIND_PATH/refind.conf
rm -rfv $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf || true rm -rfv $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf || true
for kernel_version in "$(linux-version list)" for kernel_version in "$(linux-version list)"
do do
echo -e "menuentry \"PikaOS Snapper Stanza - $kernel_version\" {\n icon /EFI/BOOT/refind-dark/icons/os_pika.png\n volume \"PikaOS\"\n loader /vmlinuz-$kernel_version\n initrd /booster.img-$kernel_version\n options \"root=PARTUUID=$ROOT_PARTUUID $REFIND_CMDLINE_OPTIONS\"\n}" >> $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf echo "Creating refind stanza for: $kernel_version"
echo -e "menuentry \"PikaOS Snapper Stanza - $kernel_version\" {\n icon /EFI/BOOT/refind-dark/icons/os_pika.png\n volume \"PikaOS\"\n loader /vmlinuz-$kernel_version\n initrd /booster.img-$kernel_version\n options \"root=PARTUUID=$ROOT_PARTUUID $REFIND_CMDLINE_OPTIONS\"\n}" >> "$EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf"
done done
} }
if [[ $DO_STANDARD_REFIND_PATH == true ]] if [[ $DO_STANDARD_REFIND_PATH == true ]]
then then
echo "Standard Refind Path Detected" echo "Standard Refind Path Detected"
create_entries "EFI/refind" create_entries "EFI/refind"
fi fi
if [[ $DO_BOOTX64_REFIND_PATH == true ]] if [[ $DO_BOOTX64_REFIND_PATH == true ]]
then then
echo "Bootx64 Refind Path Detected" echo "Bootx64 Refind Path Detected"
create_entries "EFI/BOOT" create_entries "EFI/BOOT"
fi fi