From e8b3432bcf78650035f8144a8adb2d34930c77a3 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 19 Mar 2022 02:38:39 -0400 Subject: [PATCH] [F] Fix powershell install --- pwsh.install.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pwsh.install.ps1 b/pwsh.install.ps1 index 453aa57..0560d93 100644 --- a/pwsh.install.ps1 +++ b/pwsh.install.ps1 @@ -37,12 +37,14 @@ # ln -s function ln-s ($target, $link) { - New-Item -Path $link -ItemType SymbolicLink -Value $target + gsudo New-Item -Path $link -ItemType SymbolicLink -Value $target } # Install $docs = [Environment]::GetFolderPath("MyDocuments") -rm "$docs\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" +mkdir "$docs\WindowsPowerShell" -Force +rm "$docs\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -ErrorAction Ignore ln-s "$HOME\zshrc\powershell.ps1" "$docs\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -rm "$docs\PowerShell\Microsoft.PowerShell_profile.ps1" +mkdir "$docs\PowerShell" -Force +rm "$docs\PowerShell\Microsoft.PowerShell_profile.ps1" -ErrorAction Ignore ln-s "$HOME\zshrc\powershell.ps1" "$docs\PowerShell\Microsoft.PowerShell_profile.ps1" \ No newline at end of file