Holger's Blog A good shell is the best user interface.

19Jan/120

“bestfit” is back

I recently recycled an old script I wrote several years ago to automatically generate an ISO image from selected subfolders. The idea is, that these folders are written to an archive CD/DVD if the total capacity passes the media's limit.
The script callsĀ bestfit (release 0.2.0 by Oskar Liljeblad) and that tool was no longer installed on my current workstation. But now it's back...

Please visit http://nerdbynature.de/bits/bestfit/ for a 32 Bit Debian package or an archive of the sources (tar.gz).
I used the sources to build an AMD64 package just by a call to

fakeroot debian/rules binary

within the source folder.

Usage of bestfit was simple in my case:

bestfit --quiet --invert --space="$((700*1024*1024/2048))" candidates/*

That will give me a list of folders I have to move away from the parent folder candidates, so the remaining folders will fit perfectly on the 700MBs of a Data CD.