File tree Expand file tree Collapse file tree 8 files changed +3041
-0
lines changed
Expand file tree Collapse file tree 8 files changed +3041
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+ setlocal enableDelayedExpansion
3+
4+ REM Setup initial vars
5+ set " script_name = %~n0 .command"
6+ set " thisDir = %~dp0 "
7+
8+ REM Check for our script first
9+ if not exist " !thisDir! \!script_name! " (
10+ echo Could not find !script_name! .
11+ echo Please make sure to run this script from the same directory
12+ echo as !script_name! .
13+ echo .
14+ echo Press [enter] to quit.
15+ pause > nul
16+ exit /b
17+ )
18+
19+ REM Get python location
20+ FOR /F " tokens=* USEBACKQ" %%F IN (`where python 2^ > nul `) DO (
21+ SET " python = %%F "
22+ )
23+
24+ REM Check for py and give helpful hints!
25+ if /i " !python! " == " " (
26+ echo Python is not installed or not found in your PATH var.
27+ echo Please install it from https://www.python.org/downloads/windows/
28+ echo .
29+ echo Make sure you check the box labeled:
30+ echo .
31+ echo " Add Python X.X to PATH"
32+ echo .
33+ echo Where X.X is the py version you're installing.
34+ echo .
35+ echo Press [enter] to quit.
36+ pause > nul
37+ exit /b
38+ )
39+
40+ REM Python found
41+ if " %* " == " " (
42+ " !python! " " !thisDir!!script_name! "
43+ ) else (
44+ " !python! " " !thisDir!!script_name! " %*
45+ )
You can’t perform that action at this time.
0 commit comments