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

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

// Check if we're running directly from git repo or if we're running
// from a PEAR packaged version. A direct git repo needs to set the include
// path as the pinentry program is not invoked in the current directory.
$phpDir = '@php-dir@';
if ($phpDir[0] === '@') {
    set_include_path(
        dirname(__FILE__) . DIRECTORY_SEPARATOR . '..'
        . PATH_SEPARATOR . get_include_path()
    );
}

require_once 'Crypt/GPG/PinEntry.php';

$pinentry = new Crypt_GPG_PinEntry();
$pinentry->__invoke();

?>
