I made a script that creates a macOS installation media. It runs on macOS and Linux, has few dependencies and downloads images from the official Apple catalog