Checking for required packages on a Debian (or derivative) system
Tasked with cleaning up an installation script, I noticed it was calling dpkg dozens of times to verify that the required packages were in place. On a Raspberry Pi, or similar low powered device, this takes ages. I replaced it with the following: c=0 while read -r pkg; do printf ‘Missing package: %s\n’ “$pkg” >&2 […]