forked from van1985/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bat
35 lines (31 loc) · 990 Bytes
/
setup.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
@echo off
REM insall chocolatey
echo **** Installing Chocolatey ****
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
REM install git to have bash available
echo **** Installing Git ****
cmd /c cinst git
REM run setup
echo **** Running Bootstrap Script ****
REM determine git shell location
SET sh_path_64="%ProgramFiles%\Git\bin\sh.exe"
SET sh_path_86="%ProgramFiles% (x86)\Git\bin\sh.exe"
IF EXIST %sh_path_64% (
SET sh=%sh_path_64% --login -i
)
IF EXIST %sh_path_86%= (
SET sh=%sh_path_86% --login -i
)
REM run bash commands
IF DEFINED sh (
REM prepare fake sudo file
echo #!/usr/bin/bash > sudo
echo $@ >> sudo
%sh% > bash -c "cp sudo /usr/bin/sudo"
del sudo
REM run bash command using git shell
%sh% > bash setup.sh
) ELSE (
echo "Couldn't find Git shell installation path"
EXIT /b
)