sshpk-verify.ps1 500 B

12345678910111213141516171819
  1. #!/usr/bin/env pwsh
  2. $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
  3. $exe=""
  4. if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
  5. # Fix case when both the Windows and Linux builds of Node
  6. # are installed in the same directory
  7. $exe=".exe"
  8. }
  9. $ret=0
  10. if (Test-Path "$basedir/node$exe") {
  11. & "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
  12. $ret=$LASTEXITCODE
  13. } else {
  14. & "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
  15. $ret=$LASTEXITCODE
  16. }
  17. exit $ret