build-doc: fix checks for required commands for non-debian

Fixes: 7695

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>