Compare commits

..

4 Commits

4 changed files with 31 additions and 2 deletions

6
install.fish Executable file
View File

@ -0,0 +1,6 @@
#!/bin/fish
cp ./pacman/snap-pac-uki-create.fish /usr/local/bin
echo "installed creation script."
cp ./pacman/hooks/* /usr/share/libalpm/hooks/
echo "installed pacman hooks."

View File

@ -0,0 +1,12 @@
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Performing pre UKI creation...
When = PreTransaction
Exec = /usr/local/bin/snap-pac-uki-create.fish
AbortOnFail

View File

@ -0,0 +1,11 @@
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Performing post UKI creation...
When = PostTransaction
Exec = /usr/local/bin/snap-pac-uki-create.fish

View File

@ -98,7 +98,7 @@ function create_uki -d "creates a new uki"
end
function add_efi_entry -d "adds a boot entry to efi"
efibootmgr -C -d $EFI_DEV -p $EFI_PART -l "$EFI_PATH\arch-linux-$SNAPSHOT_ID.efi" -L (rg "PRETTY_NAME" "$BUILD_PATH/$SNAPSHOT_ID/os-release-snapshot" | sed "s/PRETTY_NAME=\"\(.*\)\"/\1/")
efibootmgr -C -d $EFI_DEV -p $EFI_PART -l "$EFI_PATH\arch-linux-$SNAPSHOT_ID.efi" -L (rg "PRETTY_NAME" "$BUILD_PATH/$SNAPSHOT_ID/os-release-snapshot" | sed "s/PRETTY_NAME=\"\(.*\)\"/\1/") -q
end
function main -d "the main function"
@ -107,9 +107,9 @@ function main -d "the main function"
get_last_snapshot
create_uki
add_efi_entry
cp $BUILD_PATH/$SNAPSHOT_ID/*.efi "$EFI_DIR"
add_efi_entry
exit 0
end