[archiso] Avoid regenerate checksum -> .iso.

Also put _is_directory_changed() inside 'if' avoiding premature execution if it returns non-zero.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2011-08-26 19:01:30 -03:00
parent ee5e372c6e
commit 23e1cd01cd

View File

@ -293,11 +293,13 @@ _mkfs () {
command_checksum () {
_show_config checksum
if _is_directory_changed "${work_dir}/iso/${install_dir}" "${work_dir}/iso/${install_dir}/checksum.md5"; then
_msg_info "Creating checksum file for self-test"
cd "${work_dir}/iso/${install_dir}"
find -type f ! -name checksum.md5 -print0 | xargs -0 md5sum > checksum.md5
cd ${OLDPWD}
_msg_info "Done!"
fi
}
# Create an ISO9660 filesystem from "iso" directory.
@ -308,8 +310,7 @@ command_iso () {
_show_config iso
_is_directory_changed "${work_dir}/iso" "${img_name}"
if _is_directory_changed "${work_dir}/iso" "${img_name}"; then
_msg_info "Creating ISO image..."
local _qflag=""
if [[ ${quiet} == "y" ]]; then
@ -327,6 +328,7 @@ command_iso () {
-o "${img_name}" "${work_dir}/iso/"
isohybrid "${img_name}"
_msg_info "Done! | $(ls -sh ${img_name})"
fi
}
# Parse aitab and create each filesystem specified on that, and push it in "iso" directory.