#!/usr/bin/env php
<?php
-require_once __DIR__."/../vendor/autoload.php";
+require_once $_composer_autoload_path ?? __DIR__."/../vendor/autoload.php";
use mdref\Repo;
use mdref\Structure;
use http\Message\Body;
use function file_put_contents;
-require_once __DIR__."/../vendor/autoload.php";
+require_once $_composer_autoload_path ?? __DIR__."/../vendor/autoload.php";
+
define("ROOT", dirname(__DIR__));
define("REF2HTML", true);
namespace mdref;
-require_once __DIR__."/../vendor/autoload.php";
+require_once $_composer_autoload_path ?? __DIR__."/../vendor/autoload.php";
if ($argc < 2) {
fprintf(STDERR, "Usage: %s <ref>[ <ref> ...]\n", $argv[0]);
namespace mdref;
-require_once __DIR__."/../vendor/autoload.php";
+require_once $_composer_autoload_path ?? __DIR__."/../vendor/autoload.php";
if ($argc < 3) {
fprintf(STDERR, "Usage: cd ref-<ns> && %s <ns> <stub.php>\n", $argv[0]);