// part of the "puppet" directory, not the directory puppet-x.x.x/lib/puppet that is given to
// this function.
//
// String versionString = "";
// boolean nextIsVersion = false;
String[] segments = path.segments();
int sc = segments.length;
if(segments.length < 3 || !"puppet".equals(segments[sc - 1]) || !"lib".equals(segments[sc - 2]))
throw new IllegalArgumentException("path to .../puppet/lib is not correct");
final String distroName = segments[sc - 3];
if(!distroName.startsWith("puppet-"))