Last active
March 6, 2017 16:11
-
-
Save default-writer/8c6da298f4d04abce0c84e9273034df0 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 -u') do @( | |
@if "%%j"=="%%l" @( | |
echo %%i %%j | |
) else @( | |
@if "%%i"=="All" @( | |
@echo %%i: %%j - %%l | |
@goto:eof | |
) else @( | |
@if "%%i"=="Upgraded" @( | |
@set /a count += 1 > nul | |
) else @( | |
@if "%%i"=="Using" @( | |
@set /a count += 1 > nul | |
) else @( | |
@if "%%i"=="The" @( | |
@echo %%i %%j %%k %%l | |
@set /a count += 1 > nul | |
) else @( | |
@set /a count += 1 > nul | |
@echo %%i: %%j - %%l >> %%i.ncu | |
@echo updating %%i: %%j %> %%l | |
@echo running npm install %%i | |
@npm install %%i | |
@npm update %%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