ivandavidov / minimal-linux-script

One script which generates live Linux ISO image with minimal effort. Based on the first published version of Minimal Linux Live: http://github.com/ivandavidov/minimal
GNU General Public License v3.0
219 stars 70 forks source link

Add MD5 hashes to avoid re-download #12

Closed mittman closed 5 years ago

mittman commented 5 years ago

If hash matches skip wget. Additionally do not fail if isoimage directory exists.

ivandavidov commented 5 years ago

The idea is to start from clean host system and run clean.sh only after you have executed minimal.sh and definitely before you execute it again. The main build script was not designed with the idea to handle multiple invocations without proper "cleanup". :)

I agree your changes make sense, but they also bring additional complexity. All MD5 checksums have to be added manually with every kernel/Busybox change (Syslinux is not actively maintained and I don't expect any changes at all). Also, the proposed mkdir -p suggests that the isoimage directory may already exists. If it already exists, there might be something in it that's not part of Minimal Linux Script. In this case the build process should fail, because we don't want our MLS ISO image to be "contaminated".

Besides, I believe that if you have already downloaded kernel/Busybox/Syslinux, the wget binary is smart enough to determine whether the file has been completely downloaded before it attempts to download it again or continue the download process. Your approach with the checksums is fantastic, but in the MLS use case (minimalism in terms of number of understandable commands) I'd rather keep it simple than "fully correct".

Unlike Minimal Linux Script, the Minimal Linux Live project has been designed to handle multiple build use cases, including partial rebuild. If you haven't checked it yet, I suggest you take a look at it.

Regards, Ivan Davidov