Created
May 22, 2016 11:44
-
-
Save sebastian-marinescu/079a5cab3ae987207116cfceea4c6dc4 to your computer and use it in GitHub Desktop.
Check frontend and backend dependencies on current machine
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
@echo OFF | |
SETLOCAL EnableDelayedExpansion | |
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( | |
set "DEL=%%a" | |
) | |
mode con:cols=64 lines=55 | |
color 02 | |
echo. | |
echo " _____ _ _____ _ _ " | |
echo " / ____| | | / ____| | | | " | |
echo " | (___ ___| |_ _ _ _ __ | | | |__ ___ ___| | __ " | |
echo " \___ \ / _ \ __| | | | '_ \ | | | '_ \ / _ \/ __| |/ / " | |
echo " ____) | __/ |_| |_| | |_) | | |____| | | | __/ (__| < " | |
echo " |_____/ \___|\__|\__,_| .__/ \_____|_| |_|\___|\___|_|\_\ " | |
echo " | | " | |
echo " |_| " | |
echo. | |
echo. | |
echo. | |
call :colorEcho 07 "Frontend Dependencies" && echo. | |
call :colorEcho 07 "---------------------" && echo. | |
echo. | |
echo Checking for npm | |
WHERE npm >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "npm wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "npm found." | |
) | |
echo. | |
echo. | |
echo Checking for bower | |
WHERE bower >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "bower wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "bower found." | |
) | |
echo. | |
echo. | |
echo Checking for gem | |
WHERE gem >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "gem wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "gem found." | |
) | |
echo. | |
echo. | |
echo Checking for compass | |
WHERE compass >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "compass wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "compass found." | |
) | |
echo. | |
echo. | |
echo Checking for sass | |
WHERE sass >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "sass wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "sass found." | |
) | |
echo. | |
echo. | |
echo. | |
call :colorEcho 07 "Backend Dependencies" && echo. | |
call :colorEcho 07 "--------------------" && echo. | |
echo. | |
echo Checking for composer | |
WHERE composer >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "composer wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "composer found." | |
) | |
echo. | |
echo. | |
echo Checking for git | |
WHERE git >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "git wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "git found." | |
) | |
echo. | |
echo. | |
echo Checking for Gitify | |
WHERE Gitify >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ( | |
call :colorEcho 4F "Gitify wasn't found." | |
) ELSE ( | |
call :colorEcho 20 "Gitify found." | |
) | |
echo. | |
echo. | |
echo. | |
call :colorEcho 70 "All done" && echo. | |
pause | |
exit | |
:colorEcho | |
echo off | |
<nul set /p ".=%DEL%" > "%~2" | |
findstr /v /a:%1 /R "^$" "%~2" nul | |
del "%~2" > nul 2>&1i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment