#!/usr/bin/env php

<?php

use function GenDiff\genDiff;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
if (file_exists($autoloadPath1)) {
    require_once $autoloadPath1;
} else {
    require_once $autoloadPath2;
}


$doc = <<<'DOC'
Generate diff

Usage:
  gendiff (-h|--help)
  gendiff (-v|--version)
  gendiff [--format <fmt>] <pathToFile1> <pathToFile2>

Options:
  -h --help                     Show this screen
  -v --version                  Show version
  --format <fmt>                Report format [default: pretty]
DOC;

$args = Docopt::handle($doc, array('version' => '0.1'));

print_r(genDiff($args["<pathToFile1>"], $args["<pathToFile2>"], $args["--format"]));
print_r("\n");
