Last active
March 6, 2017 16:12
-
-
Save default-writer/722d63333efea0ec3c7cf8b20e33524d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@setlocal ENABLEDELAYEDEXPANSION | |
@echo off | |
:loop | |
set /a count = 0 | |
for /f "eol=! tokens=1,2,3,* delims=: " %%i in ('ncu -g') do @( | |
if "%%j"=="%%l" @( | |
@echo %%i %%j | |
) else @( | |
if "%%i"=="All" @( | |
@echo %%i: %%j - %%l | |
@goto:eof | |
) else @( | |
@set /a count += 1 > nul | |
@echo %%i: %%j - %%l >> %%i.ncu | |
@echo updating %%i: %%j %> %%l | |
@echo running npm install -g %%i | |
@npm install -g %%i | |
@npm update -g %%i | |
) | |
) | |
) | |
if "%count%"=="0" goto:eof | |
goto loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment