From: AJ ONeal Date: Wed, 29 Apr 2020 20:48:40 +0000 (+0000) Subject: work from userprofile X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=030f22f4f4bd991766bebbe6d6ce658cb8b78f7e;p=webi-installers%2F.git work from userprofile --- diff --git a/node/node.bat b/node/node.bat index 74b1319..b8ef142 100644 --- a/node/node.bat +++ b/node/node.bat @@ -1,18 +1,20 @@ -setlocal @echo off -pushd "%userprofile%\.local\opt" || goto :error - powershell $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://nodejs.org/dist/v12.16.2/node-v12.16.2-win-x64.zip -OutFile node-v12.16.2-win-x64.zip || goto :error - rem Windows BSD-tar handles zip. Imagine that. - tar xf node-v12.16.2-win-x64.zip || goto :error - dir - rename node-v12.16.2-win-x64 node-v12.16.2 || goto :error - rmdir node-v12.16.2-win-x64 - del node-v12.16.2-win-x64.zip || goto :error -popd || goto :error +setlocal +pushd "%userprofile%" || goto :error + pushd "%userprofile%\.local\opt" || goto :error + powershell $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://nodejs.org/dist/v12.16.2/node-v12.16.2-win-x64.zip -OutFile node-v12.16.2-win-x64.zip || goto :error + rem Windows BSD-tar handles zip. Imagine that. + tar xf node-v12.16.2-win-x64.zip || goto :error + dir + rename node-v12.16.2-win-x64 node-v12.16.2 || goto :error + rmdir node-v12.16.2-win-x64 + del node-v12.16.2-win-x64.zip || goto :error + popd || goto :error -rem make npm not act stupid about which node to use... ugh (this should be the default) -"%userprofile%\.local\opt\node-v12.16.2\npm.cmd" --scripts-prepend-node-path=true config set scripts-prepend-node-path true -pathman add .local\opt\node-v12.16.2 || goto :error + rem make npm not act stupid about which node to use... ugh (this should be the default) + .\.local\opt\node-v12.16.2\npm.cmd" --scripts-prepend-node-path=true config set scripts-prepend-node-path true || goto :error + pathman add .local\opt\node-v12.16.2 || goto :error +popd || goto :error goto :EOF diff --git a/webi/webinstall.bat b/webi/webinstall.bat index 588b0e5..50d18bf 100644 --- a/webi/webinstall.bat +++ b/webi/webinstall.bat @@ -17,9 +17,9 @@ pushd "%userprofile%" || goto :error call .\pathman-setup.bat || goto :error del pathman-setup.bat || goto :error rem TODO there's rumor of a windows tool called 'pathman' that does the same thing? - pathman add "%userprofile%\.local\bin" || goto :error ) popd || goto :error + .\.local\bin\pathman add ".local\bin" || goto :error echo downloading and installing %1 powershell $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://webinstall.dev/packages/%1/%1.bat -OutFile %1-webinstall.bat || goto :error