-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.bat
44 lines (40 loc) · 1.01 KB
/
start.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
mode con: cols=90 lines=26
title Meme Downloader
where npm.cmd >nul 2>&1 && goto NPMInstalled || goto NPMNotInstalled
:NPMInstalled
where node.exe >nul 2>&1 && goto NodeInstalled || goto NodeNotInstalled
:NodeInstalled
echo Updating Libraries . . .
echo.
call npm i image-download image-type memejs-c456 colors
title Meme Downloader
echo Libraries are up to date!
echo.
echo Press any key to continue . . .
pause>nul
if not exist memes mkdir memes
cd memes
cls
call node ../scripts/writeHeader.js
echo.
echo Close this window at any time to stop the download process
echo.
echo.
echo Press any key to begin downloading . . .
pause>nul
:loop
cls
call node ../scripts/writeHeader.js
call node ../scripts/writeDownloadCounter.js
call node ../index.js
goto loop
:NPMNotInstalled
echo Node Package Manager (NPM) is not installed on your system. Please install NPM and try again.
goto end
:NodeNotInstalled
echo NodeJS Runtime is not installed on your system. Please install NodeJS and try again.
goto end
:end
pause
exit