forked from vnotex/vnote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.cmd
More file actions
50 lines (42 loc) · 1.22 KB
/
Copy pathinit.cmd
File metadata and controls
50 lines (42 loc) · 1.22 KB
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
45
46
47
48
49
50
@echo off
REM Initialization script for VNote development environment on Windows
REM This script calls init.sh using Git Bash
setlocal
echo ========================================
echo Initializing VNote development environment
echo ========================================
echo.
REM Check if Git Bash is available
where bash.exe >nul 2>&1
if %errorlevel% neq 0 (
echo Error: Git Bash not found in PATH
echo.
echo Please ensure Git for Windows is installed and bash.exe is in your PATH.
echo You can download Git for Windows from: https://git-scm.com/download/win
echo.
echo Alternatively, run the init.sh script directly from Git Bash:
echo bash scripts/init.sh
echo.
pause
exit /b 1
)
REM Get the directory where this script is located
set SCRIPT_DIR=%~dp0
set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
REM Convert Windows path to Unix-style path for Git Bash
REM Change C:\path\to\file to /c/path/to/file
set UNIX_PATH=%SCRIPT_DIR:\=/%
set UNIX_PATH=%UNIX_PATH::=%
set UNIX_PATH=/%UNIX_PATH%
REM Run the bash script
bash.exe "%UNIX_PATH%/init.sh"
if %errorlevel% neq 0 (
echo.
echo Error: Initialization failed
pause
exit /b 1
)
echo.
echo You can now start developing VNote!
echo.
pause