aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-07-16 06:17:47 +0200
committersrdusr <trevorgray@srdusr.com>2023-07-16 06:17:47 +0200
commit6963a31d8878a4b644412745f6962260362141f6 (patch)
treeff25b057592afa1768baf9aa0058de45417fc027
parent933e5894500b3e0101482ed6b168374ae0739158 (diff)
downloaddotfiles-6963a31d8878a4b644412745f6962260362141f6.tar.gz
dotfiles-6963a31d8878a4b644412745f6962260362141f6.zip
Fixed join-path
-rw-r--r--win-nvim.ps115
1 files changed, 12 insertions, 3 deletions
diff --git a/win-nvim.ps1 b/win-nvim.ps1
index 2ca2509..1e208d7 100644
--- a/win-nvim.ps1
+++ b/win-nvim.ps1
@@ -1,3 +1,8 @@
+# Install Git (if not already present on the system)
+if (!(Get-Command git -ErrorAction SilentlyContinue)) {
+ winget install Git.Git
+}
+
# Install NeoVim with winget, if not already present on the system
if (!(Get-Command nvim -ErrorAction SilentlyContinue)) {
winget install Neovim.Neovim
@@ -12,10 +17,10 @@ if (!(Test-Path $dotFilesRoot -PathType Container)) {
# Link NeoVim configuration
$localConfiguration = Join-Path $env:LOCALAPPDATA "nvim"
-$dotfilesConfiguration = Join-Path $dotFilesRoot ".config" "nvim"
+$dotfilesConfiguration = Join-Path (Join-Path $dotFilesRoot ".config") "nvim"
if (!(Test-Path $localConfiguration -PathType Container)) {
- Start-Process -FilePath "cmd.exe" -ArgumentList "/c mklink /D $localConfiguration $dotfilesConfiguration" -Verb runas
+ Start-Process -FilePath "cmd.exe" -ArgumentList "/c mklink /D `"$localConfiguration`" `"$dotfilesConfiguration`"" -Verb runas
}
# Clone Packer.nvim, if not already present on the system
@@ -29,6 +34,11 @@ if (!(Test-Path $localPacker -PathType Container)) {
# Set-ExecutionPolicy RemoteSigned
# Then run the script by using this command in the same existing directory:
# ./win-nvim.ps1
+
+# To allow script execution, run the following command in PowerShell as an administrator:
+# Set-ExecutionPolicy RemoteSigned
+# Then run the script by using this command in the same existing directory:
+# ./win-nvim.ps1
#curl -o winget-cli.appxbundle https://aka.ms/winget-cli-appxbundle
#powershell Add-AppxPackage -Path "winget-cli.appxbundle"
#Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
@@ -50,4 +60,3 @@ if (!(Test-Path $localPacker -PathType Container)) {
#Unexpected token 'Refresh' in expression or statement.
# + CategoryInfo : ParserError: (:) [], ParseException
# + FullyQualifiedErrorId : MissingExpressionAfterOperator
-