add webi dat dat dat
[webi-installers/.git] / golang / install.ps1
index 5649e07251d53e3f79423706db8d89ccb20a6bc0..0ae4a62388195411f0139040b7589c79948ee10e 100644 (file)
@@ -11,7 +11,9 @@ $pkg_dst_bin = "$pkg_dst\bin"
 
 if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue))
 {
-    & powershell -ExecutionPolicy Bypass "$Env:USERPROFILE\.local\bin\webi.ps1" git
+    & "$Env:USERPROFILE\.local\bin\webi.ps1" git
+    # because we need git.exe to be available to golang immediately
+    $Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH"
 }
 
 # Fetch archive
@@ -74,9 +76,11 @@ echo stringer
 & "$pkg_dst_cmd" get golang.org/x/tools/cmd/stringer 
 
 # Add to path
-& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$Env:USERPROFILE\.local\opt\go\bin"
+& "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/.local/opt/go/bin
+#& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$Env:USERPROFILE\.local\opt\go\bin"
 #& "$Env:USERPROFILE\.local\bin\pathman.exe" add %USERPROFILE%\.local\opt\go\bin
 
 # Special to go: add default GOBIN to PATH
-& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$Env:USERPROFILE\go\bin"
+& "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/go/bin
+#& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$Env:USERPROFILE\go\bin"
 #& "$Env:USERPROFILE\.local\bin\pathman.exe" add %USERPROFILE%\go\bin