better naming for build utils

This commit is contained in:
ading2210 2023-12-20 22:09:41 -08:00
parent 86269dfa05
commit 2995760db4
3 changed files with 10 additions and 24 deletions

View File

@ -7,8 +7,7 @@ if [ "$DEBUG" ]; then
set -x set -x
fi fi
. ./patch_initramfs.sh . ./image_utils.sh
. ./build_image.sh
. ./shim_utils.sh . ./shim_utils.sh
print_help() { print_help() {

View File

@ -1,10 +1,5 @@
#!/bin/bash #!/bin/bash
set -e
if [ "$DEBUG" ]; then
set -x
fi
create_loop() { create_loop() {
local loop_device=$(losetup -f) local loop_device=$(losetup -f)
losetup -P $loop_device "${1}" losetup -P $loop_device "${1}"
@ -128,4 +123,13 @@ create_image() {
fallocate -l "${total_size}M" "${image_path}" fallocate -l "${total_size}M" "${image_path}"
partition_disk $image_path $bootloader_size partition_disk $image_path $bootloader_size
}
patch_initramfs() {
local initramfs_path=$(realpath $1)
rm "${initramfs_path}/init" -f
cp -r bootloader/* "${initramfs_path}/"
find ${initramfs_path}/bin -name "*" -exec chmod +x {} \;
} }

View File

@ -1,17 +0,0 @@
#!/bin/bash
#patch the shim initramfs to add the bootloader
set -e
if [ "$DEBUG" ]; then
set -x
fi
patch_initramfs() {
local initramfs_path=$(realpath $1)
rm "${initramfs_path}/init" -f
cp -r bootloader/* "${initramfs_path}/"
find ${initramfs_path}/bin -name "*" -exec chmod +x {} \;
}