shimboot/patch_initramfs.sh

18 lines
295 B
Bash
Raw Normal View History

2023-10-02 01:08:31 -05:00
#!/bin/bash
#patch the shim initramfs to add the bootloader
set -e
if [ "$DEBUG" ]; then
set -x
fi
2023-10-02 14:17:59 -05:00
patch_initramfs() {
initramfs_path=$(realpath $1)
2023-10-02 01:08:31 -05:00
2023-10-02 14:17:59 -05:00
rm "${initramfs_path}/init" -f
cp -r bootloader/* "${initramfs_path}/"
2023-10-02 14:06:06 -05:00
2023-10-02 14:17:59 -05:00
find ${initramfs_path}/bin -name "*" -exec chmod +x {} \;
}