main
|
Last change
on this file since 142c0f8 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 18 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
837 bytes
|
| Rev | Line | |
|---|
| [d24f17c] | 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 | # Support pipeline input
|
|---|
| 13 | if ($MyInvocation.ExpectingInput) {
|
|---|
| 14 | $input | & "$basedir/node$exe" "$basedir/../remarkable/bin/remarkable.js" $args
|
|---|
| 15 | } else {
|
|---|
| 16 | & "$basedir/node$exe" "$basedir/../remarkable/bin/remarkable.js" $args
|
|---|
| 17 | }
|
|---|
| 18 | $ret=$LASTEXITCODE
|
|---|
| 19 | } else {
|
|---|
| 20 | # Support pipeline input
|
|---|
| 21 | if ($MyInvocation.ExpectingInput) {
|
|---|
| 22 | $input | & "node$exe" "$basedir/../remarkable/bin/remarkable.js" $args
|
|---|
| 23 | } else {
|
|---|
| 24 | & "node$exe" "$basedir/../remarkable/bin/remarkable.js" $args
|
|---|
| 25 | }
|
|---|
| 26 | $ret=$LASTEXITCODE
|
|---|
| 27 | }
|
|---|
| 28 | exit $ret
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.