aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-02-03 10:36:38 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-02-03 10:36:38 +0900
commit3a0970d7afa93bcfcbca7c0cdda837916b5ea6a7 (patch)
treeb6c03edef13edc7608890280f9c7f3455a10e9b5 /installer
parent0cfdb045bcc9664dbafd41d72aa49ac58c7105e2 (diff)
downloadvim-lsp-settings-3a0970d7afa93bcfcbca7c0cdda837916b5ea6a7.tar.gz
vim-lsp-settings-3a0970d7afa93bcfcbca7c0cdda837916b5ea6a7.tar.bz2
vim-lsp-settings-3a0970d7afa93bcfcbca7c0cdda837916b5ea6a7.zip
Add installer for pwsh
Diffstat (limited to 'installer')
-rw-r--r--installer/install-powershell-languageserver.cmd3
-rwxr-xr-xinstaller/install-powershell-languageserver.sh19
2 files changed, 21 insertions, 1 deletions
diff --git a/installer/install-powershell-languageserver.cmd b/installer/install-powershell-languageserver.cmd
index a9e3cc0..ae63ef4 100644
--- a/installer/install-powershell-languageserver.cmd
+++ b/installer/install-powershell-languageserver.cmd
@@ -1,8 +1,9 @@
@echo off
-curl -o PowerShellEditorServices.zip "https://github.com/PowerShell/PowerShellEditorServices/releases/download/2.0.0-preview.8/PowerShellEditorServices.zip"
+curl -L -o PowerShellEditorServices.zip "https://github.com/PowerShell/PowerShellEditorServices/releases/download/2.0.0-preview.8/PowerShellEditorServices.zip"
call "%~dp0\run_unzip.cmd" PowerShellEditorServices.zip
del PowerShellEditorServices.zip
+mkdir %~dp0session
echo @echo off ^
diff --git a/installer/install-powershell-languageserver.sh b/installer/install-powershell-languageserver.sh
new file mode 100755
index 0000000..f9f823f
--- /dev/null
+++ b/installer/install-powershell-languageserver.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+set -e
+
+curl -L -o PowerShellEditorServices.zip "https://github.com/PowerShell/PowerShellEditorServices/releases/download/2.0.0-preview.8/PowerShellEditorServices.zip"
+unzip PowerShellEditorServices.zip
+rm PowerShellEditorServices.zip
+mkdir session
+
+cat <<EOF >powershell-languageserver
+#!/usr/bin/env bash
+
+DIR=\$(cd \$(dirname \$0); pwd)
+PSES_BUNDLE_PATH=\$DIR/PowerShellEditorServices
+SESSION_TEMP_PATH=\$DIR/session
+pwsh -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command "\$PSES_BUNDLE_PATH/PowerShellEditorServices/Start-EditorServices.ps1 -BundledModulesPath \$PSES_BUNDLE_PATH -LogPath \$SESSION_TEMP_PATH/logs.log -SessionDetailsPath \$SESSION_TEMP_PATH/session.json -FeatureFlags @() -AdditionalModules @() -HostName 'My Client' -HostProfileId 'myclient' -HostVersion 1.0.0 -Stdio -LogLevel Normal"
+EOF
+
+chmod +x powershell-languageserver