Skip to content

Instantly share code, notes, and snippets.

@webflo
Created October 26, 2017 15:03
Show Gist options
  • Save webflo/321e148851048c8cdb346a675f27d2ce to your computer and use it in GitHub Desktop.
Save webflo/321e148851048c8cdb346a675f27d2ce to your computer and use it in GitHub Desktop.
drupal-finder.php
<?php
// Usage: php drupal-finder.php /var/www/some/example/path
include __DIR__ . '/vendor/autoload.php';
$path = array_pop($argv);
$finder = new \DrupalFinder\DrupalFinder();
print "Input: " . $path . PHP_EOL;
print "Input realpath: " . realpath($path) . PHP_EOL;
if ($finder->locateRoot($path)) {
var_export($finder);
}
else {
var_dump('FAILED!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment