#!/usr/bin/env php
<?php

/**
 * @file
 * Builds the SBOM of a Drupal codebase without running it.
 *
 * Run it from a separate DruBOM checkout, after "composer install" there.
 */

declare(strict_types=1);

$autoload = dirname(__DIR__) . '/vendor/autoload.php';
if (!is_file($autoload)) {
  fwrite(STDERR, sprintf("drubom-scan: run \"composer install\" in %s first.\n", dirname(__DIR__)));
  exit(1);
}
require $autoload;
exit(Drupal\drubom\Scan\ScanCommand::run(array_slice($argv, 1)));
