custom output name and compression program

This commit is contained in:
illiliti 2020-02-14 03:03:24 +03:00
parent 5cd50d3b0d
commit 2392ff0752
2 changed files with 9 additions and 3 deletions

6
config
View File

@ -5,9 +5,15 @@
# debug mode # debug mode
#debug=1 #debug=1
# custom output name
#initramfs=""
# custom kernel version # custom kernel version
#kernel="" #kernel=""
# custom compression program
#compress=""
# parse fstab # parse fstab
#use_fstab=0 #use_fstab=0

View File

@ -390,9 +390,9 @@ create_initramfs() {
cd "$tmpdir" cd "$tmpdir"
find . \ find . \
| cpio -oH newc \ | cpio -oH newc \
| gzip -9 | ${compress:-gzip -9}
) \ ) \
| tee "${script_dir}/initramfs-${kernel}.img.gz" | tee "${script_dir}/${initramfs:-initramfs-${kernel}}"
} > /dev/null 2>&1 || msg panic "failed to generate initramfs image" } > /dev/null 2>&1 || msg panic "failed to generate initramfs image"
} }
@ -450,4 +450,4 @@ esac
install_files install_files
create_initramfs create_initramfs
msg info "done! check out initramfs-${kernel}.img.gz" msg info "done! check out ${initramfs:-initramfs-${kernel}}"