-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.bat
29 lines (25 loc) · 871 Bytes
/
install.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
@echo off
setlocal
for %%i in ("%~dp0.") do SET "script_dir=%%~fi"
cd "%script_dir%" || echo "unable to cd to '%script_dir%'"&& exit /b 1
setlocal enabledelayedexpansion
for %%i in ("%~dp0.") do SET "dirname=%%~ni"
if not exist batcolors\echos.bat (
echo Missing submodules
echo Executing 'git submodule update --init'
git submodule update --init
if errorlevel 1 (
echo "Submodules not properly initialized"
exit /b 1
)
)
call "%script_dir%\batcolors\echos_macros.bat"
if exist "%script_dir%\senv.bat" (
call "%script_dir%\senv.bat"
)
%_task% "Must copy '%dirname%.exe' to '%GOPATH%\bin\git-grep.exe'"
cp -f "%dirname%.exe" "%GOPATH%\bin\git-grep.exe"
if errorlevel 1 (
%_fatal% "Unable to copy '%dirname%.exe' to '%GOPATH%\bin\git-grep.exe'" 2
)
%_ok% "Successfully copied '%dirname%.exe' to '%GOPATH%\bin\git-grep.exe'"