Verified Commit 8cfe2904 authored by nl6720's avatar nl6720
Browse files

mkarchiso: use mksquashfs -quiet instead of redirecting its stdout to /dev/null

mksquashfs supports a -quiet option since squashfs-tools 4.4.
Use this option in non-verbose mode instead of redirecting stdout of the whole command to /dev/null.

This allows to have only one instance of mksquashfs in _run_mksquashfs instead of multiple ones in if-then-else.

Related to #148.
parent 009140bd
......@@ -165,13 +165,10 @@ _cleanup_pacstrap_dir() {
# Create a squashfs image and place it in the ISO 9660 file system.
# $@: options to pass to mksquashfs
_run_mksquashfs() {
local image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.sfs"
local mksquashfs_options=() image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.sfs"
rm -f -- "${image_path}"
if [[ "${quiet}" == "y" ]]; then
mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" -no-progress > /dev/null
else
mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}"
fi
[[ ! "${quiet}" == "y" ]] || mksquashfs_options+=('-no-progress' '-quiet')
mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" "${mksquashfs_options[@]}"
}
# Create an ext4 image containing the root file system and pack it inside a squashfs image.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment