forked from ChronosWS/APIEvolved
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.bat
42 lines (34 loc) · 1.26 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
@echo off
:install
if not exist node.exe (
echo Installing NodeJS
powershell -command "(new-object System.Net.WebClient).DownloadFile('https://nodejs.org/dist/v0.12.7/x64/node.exe', '.\node.exe')"
)
if not exist npm.cmd (
echo Installing and Updating NPM
powershell -command "(new-object System.Net.WebClient).DownloadFile('http://nodejs.org/dist/npm/npm-1.4.9.zip', '.\npm.zip')"
if not exist 7za.exe (
powershell -command "(new-object System.Net.WebClient).DownloadFile('https://xstasy.gbps.io/files/7za.exe', '.\7za.exe')"
7za.exe x npm.zip -r -aou >nul 2>&1
del npm.zip /S /Q >nul 2>&1
call npm.cmd install npm >nul 2>&1
)
)
goto:update
:update
echo Updating APIEvolved
if not exist 7za.exe (
powershell -command "(new-object System.Net.WebClient).DownloadFile('https://xstasy.gbps.io/files/7za.exe', '.\7za.exe')"
)
powershell -command "(new-object System.Net.WebClient).DownloadFile('https://github.com/teamarkbar/APIEvolved/archive/master.zip', '.\update.zip')"
7za.exe x update.zip -r -aou >nul 2>&1
XCOPY .\APIEvolved-master\* . /Y /S /Q >nul 2>&1
rd .\APIEvolved-master /S /Q >nul 2>&1
del 7za.exe /S /Q >nul 2>&1
del update.zip /S /Q >nul 2>&1
echo Updating Dependencies
call npm.cmd install >nul 2>&1
goto:start
:start
title APIEvolved
node.exe app.js