Compare commits
4 Commits
5383069d66
...
333b8d06fe
Author | SHA1 | Date | |
---|---|---|---|
333b8d06fe | |||
988331e6e3 | |||
5885881075 | |||
16ec7f0955 |
6
install.fish
Executable file
6
install.fish
Executable 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."
|
12
pacman/hooks/01_snap-pac-uki_pre.hook
Normal file
12
pacman/hooks/01_snap-pac-uki_pre.hook
Normal 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
|
11
pacman/hooks/zz_snap-pac-uki_post.hook
Normal file
11
pacman/hooks/zz_snap-pac-uki_post.hook
Normal 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
|
@ -98,7 +98,7 @@ function create_uki -d "creates a new uki"
|
|||||||
end
|
end
|
||||||
|
|
||||||
function add_efi_entry -d "adds a boot entry to efi"
|
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
|
end
|
||||||
|
|
||||||
function main -d "the main function"
|
function main -d "the main function"
|
||||||
@ -107,9 +107,9 @@ function main -d "the main function"
|
|||||||
|
|
||||||
get_last_snapshot
|
get_last_snapshot
|
||||||
create_uki
|
create_uki
|
||||||
add_efi_entry
|
|
||||||
|
|
||||||
cp $BUILD_PATH/$SNAPSHOT_ID/*.efi "$EFI_DIR"
|
cp $BUILD_PATH/$SNAPSHOT_ID/*.efi "$EFI_DIR"
|
||||||
|
add_efi_entry
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user