Skip to content

Commit

Permalink
Fix for calling apps in the path.
Browse files Browse the repository at this point in the history
  • Loading branch information
macrini committed Nov 11, 2020
1 parent 0647d16 commit 069b9e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Bibutils.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function convert(array $options): string
$cmd = self::makeReadCommand($srcPath, $srcFmt);
$app = self::getWriteApp($options['out'] ?? '');

return self::run("$cmd | ./$app");
return self::run("$cmd | $app");
}

public static function getReadApp(string $format): string
Expand All @@ -72,9 +72,9 @@ public static function getReadApp(string $format): string
case 'nbib':
case 'ris':
case 'wordbib':
return $format . '2xml';
return './' . $format . '2xml';
case 'doc':
return 'wordbib2xml';
return './wordbib2xml';
case 'mod':
case 'xml':
return 'cat'; // trivial case
Expand All @@ -94,10 +94,10 @@ public static function getWriteApp(string $format): string
case 'isi':
case 'nbib':
case 'ris':
case 'wordbib':
case './wordbib':
return 'xml2' . $format;
case 'doc':
return 'xml2wordbib';
return './xml2wordbib';
case 'mod':
case 'xml':
return 'cat'; // trivial case
Expand Down Expand Up @@ -153,7 +153,7 @@ protected static function makeReadCommand(

$app = self::getReadApp($format);

return "./$app '$filename'";
return "$app '$filename'";
}

protected static function run(string $cmd): string
Expand Down

0 comments on commit 069b9e5

Please sign in to comment.