| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | #!/usr/bin/env pwsh |
| 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
| 3 | |
| 4 | $exe="" |
| 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
| 6 | # Fix case when both the Windows and Linux builds of Node |
| 7 | # are installed in the same directory |
| 8 | $exe=".exe" |
| 9 | } |
| 10 | $ret=0 |
| 11 | if (Test-Path "$basedir/node$exe") { |
| 12 | & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args |
| 13 | $ret=$LASTEXITCODE |
| 14 | } else { |
| 15 | & "node$exe" "$basedir/../esprima/bin/esparse.js" $args |
| 16 | $ret=$LASTEXITCODE |
| 17 | } |
| 18 | exit $ret |