comparison vendor/pear/crypt_gpg/scripts/crypt-gpg-pinentry @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
1 #! /usr/bin/env php
2 <?php
3
4 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
5
6 // Check if we're running directly from git repo or if we're running
7 // from a PEAR or Composer packaged version.
8 $ds = DIRECTORY_SEPARATOR;
9 $root = __DIR__ . $ds . '..' ;
10 $paths = array(
11 '@php-dir@', // PEAR or Composer
12 $root, // Git (or Composer with wrong @php-dir@)
13 $root . $ds . '..' . $ds . 'Console_CommandLine', // Composer
14 $root . $ds . '..' . $ds . 'console_commandline', // Composer
15 // and composer-installed PEAR_Exception for Console_CommandLine (#21074)
16 $root . $ds . '..' . $ds . '..' . $ds . 'pear' . $ds . 'pear_exception',
17 );
18
19 foreach ($paths as $idx => $path) {
20 if (!is_dir($path)) {
21 unset($paths[$idx]);
22 }
23 }
24
25 // We depend on Console_CommandLine, so we append also the default include path
26 set_include_path(implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path());
27
28 require_once 'Crypt/GPG/PinEntry.php';
29
30 $pinentry = new Crypt_GPG_PinEntry();
31 $pinentry->__invoke();
32
33 ?>