diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-26 19:01:30 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-26 19:23:25 -0300 |
commit | 23e1cd01cd28611b48f386e445639b262bdd36cb (patch) | |
tree | 021d14e6fcca806819c917c5993261001a629fbb /archiso/mkarchiso | |
parent | ee5e372c6ea517c9e197d8f71f463297f81d15f5 (diff) | |
download | archiso32-23e1cd01cd28611b48f386e445639b262bdd36cb.tar.xz |
[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>
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-x | archiso/mkarchiso | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 6826441..28693b6 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -293,11 +293,13 @@ _mkfs () { command_checksum () { _show_config checksum - _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!" + 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,25 +310,25 @@ command_iso () { _show_config iso - _is_directory_changed "${work_dir}/iso" "${img_name}" - - _msg_info "Creating ISO image..." - local _qflag="" - if [[ ${quiet} == "y" ]]; then - _qflag="-quiet" + if _is_directory_changed "${work_dir}/iso" "${img_name}"; then + _msg_info "Creating ISO image..." + local _qflag="" + if [[ ${quiet} == "y" ]]; then + _qflag="-quiet" + fi + mkisofs ${_qflag} -r -l \ + -b isolinux/isolinux.bin -c isolinux/boot.cat \ + -uid 0 -gid 0 \ + -udf -allow-limited-size -iso-level 3 \ + -input-charset utf-8 -p "prepared by mkarchiso" \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + -publisher "${iso_publisher}" \ + -A "${iso_application}" \ + -V "${iso_label}" \ + -o "${img_name}" "${work_dir}/iso/" + isohybrid "${img_name}" + _msg_info "Done! | $(ls -sh ${img_name})" fi - mkisofs ${_qflag} -r -l \ - -b isolinux/isolinux.bin -c isolinux/boot.cat \ - -uid 0 -gid 0 \ - -udf -allow-limited-size -iso-level 3 \ - -input-charset utf-8 -p "prepared by mkarchiso" \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ - -publisher "${iso_publisher}" \ - -A "${iso_application}" \ - -V "${iso_label}" \ - -o "${img_name}" "${work_dir}/iso/" - isohybrid "${img_name}" - _msg_info "Done! | $(ls -sh ${img_name})" } # Parse aitab and create each filesystem specified on that, and push it in "iso" directory. |