diff options
Diffstat (limited to 'install-win.ps1')
| -rw-r--r-- | install-win.ps1 | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/install-win.ps1 b/install-win.ps1 index 15f39e4..aa77243 100644 --- a/install-win.ps1 +++ b/install-win.ps1 | |||
| @@ -1,18 +1,11 @@ | |||
| 1 | #Requires -Version 5.1 | 1 | #Requires -Version 5.1 |
| 2 | <# | 2 | <# |
| 3 | Windows-natives Pendant zu install.sh (ersetzt install-win.cmd). | 3 | Windows-natives Pendant zu install.sh - kopiert (statt zu verlinken) die |
| 4 | install.sh bleibt unveraendert - kopiert (statt zu verlinken) die | ||
| 5 | relevanten Konfigurationen an ihre nativen Windows-Zielorte. Keine | 4 | relevanten Konfigurationen an ihre nativen Windows-Zielorte. Keine |
| 6 | Admin-Rechte noetig (keine Symlinks). | 5 | Admin-Rechte noetig (keine Symlinks). |
| 7 | 6 | ||
| 8 | Aufruf: | 7 | Aufruf: |
| 9 | .\install-win.ps1 | 8 | .\install-win.ps1 |
| 10 | |||
| 11 | Falls die Ausfuehrung durch die Execution Policy blockiert wird: | ||
| 12 | powershell -ExecutionPolicy Bypass -File .\install-win.ps1 | ||
| 13 | |||
| 14 | Hinweis: Es wird KOPIERT, nicht verlinkt. Nach Aenderungen im Repo | ||
| 15 | dieses Skript erneut ausfuehren, um die Kopien zu aktualisieren. | ||
| 16 | #> | 9 | #> |
| 17 | 10 | ||
| 18 | $ErrorActionPreference = "Stop" | 11 | $ErrorActionPreference = "Stop" |
| @@ -75,17 +68,13 @@ function Copy-Npmrc { | |||
| 75 | return | 68 | return |
| 76 | } | 69 | } |
| 77 | 70 | ||
| 78 | # npm/npmrc setzt "prefix=${HOME}/.local", damit globale npm-Installationen | 71 | # HOME ist unter Windows i.d.R. nicht gesetzt, ${HOME} in npm/npmrc wuerde |
| 79 | # unter POSIX ohne sudo/root ins Home-Verzeichnis gehen. HOME ist unter | 72 | # nicht expandieren - Zeile daher auskommentieren statt zweite npmrc-Datei |
| 80 | # Windows i.d.R. nicht gesetzt, ${HOME} wuerde also nicht expandieren. | 73 | # zu pflegen. |
| 81 | # Der Grund fuer die Einstellung entfaellt unter Windows ohnehin (npm | ||
| 82 | # nutzt dort schon von Haus aus %APPDATA%\npm, automatisch im PATH) - | ||
| 83 | # die Zeile wird beim Kopieren einfach auskommentiert, statt eine zweite | ||
| 84 | # npmrc-Datei zu pflegen. | ||
| 85 | Write-Step "npm\npmrc -> $NpmrcDst (prefix-Zeile auskommentiert)" | 74 | Write-Step "npm\npmrc -> $NpmrcDst (prefix-Zeile auskommentiert)" |
| 86 | $lines = Get-Content -Path $NpmrcSrc | ForEach-Object { | 75 | $lines = Get-Content -Path $NpmrcSrc | ForEach-Object { |
| 87 | if ($_ -match "^\s*prefix\s*=") { | 76 | if ($_ -match "^\s*prefix\s*=") { |
| 88 | "; $_ (unter Windows auskommentiert, siehe install-win.ps1: Copy-Npmrc)" | 77 | "; $_ (unter Windows auskommentiert)" |
| 89 | } else { | 78 | } else { |
| 90 | $_ | 79 | $_ |
| 91 | } | 80 | } |
