-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsession.bat
More file actions
32 lines (23 loc) · 848 Bytes
/
session.bat
File metadata and controls
32 lines (23 loc) · 848 Bytes
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
@echo off
:: Will cause variables to be expanded at execution time rather than at parse time.
setlocal enabledelayedexpansion
:: Convert the windows path of the home directory to non-colon backslashed style.
set input=\%HOMEDRIVE%%HOMEPATH%
set match=:
set replace=
set backslashed=!input:%match%=%replace%!
:: Convert non-colon backslashed style to forward slashes.
set input=%backslashed%
set match=\
set replace=/
set forwarded=!input:%match%=%replace%!
:: Set human HOME to MinGW style path.
set HOME=%forwarded%
:: Set bash EXECUTABLE.
set BASH_EXECUTABLE=bash.exe
:: Set session HOME.
set SESSION_HOME=/mnt/c/Users/rubin/Syncthing/Source/RAAF/session
:: Set session EXECUTABLE.
set SESSION_EXECUTABLE=%SESSION_HOME%/session.sh
:: Invoke session directly.
"%BASH_EXECUTABLE%" "%SESSION_EXECUTABLE%" %*