That depends on a country. For Polish consulate it takes few days just to convert the local certificate to Polish one and get PESEL. Then and only then they order a passport that’s being printed in Poland.
Emergency passport would do here tho. Still I’d expect few days at minimum to talk to all those people.