forked from cloudtools/stacker
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstacker.cmd
More file actions
46 lines (40 loc) · 1.03 KB
/
stacker.cmd
File metadata and controls
46 lines (40 loc) · 1.03 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
@echo OFF
REM="""
setlocal
set PythonExe=""
set PythonExeFlags=
for %%i in (cmd bat exe) do (
for %%j in (python.%%i) do (
call :SetPythonExe "%%~$PATH:j"
)
)
for /f "tokens=2 delims==" %%i in ('assoc .py') do (
for /f "tokens=2 delims==" %%j in ('ftype %%i') do (
for /f "tokens=1" %%k in ("%%j") do (
call :SetPythonExe %%k
)
)
)
%PythonExe% -x %PythonExeFlags% "%~f0" %*
exit /B %ERRORLEVEL%
goto :EOF
:SetPythonExe
if not ["%~1"]==[""] (
if [%PythonExe%]==[""] (
set PythonExe="%~1"
)
)
goto :EOF
"""
# ===================================================
# Python script starts here
# Above helper adapted from https://github.com/aws/aws-cli/blob/1.11.121/bin/aws.cmd
# ===================================================
#!/usr/bin/env python
from stacker.logger import setup_logging
from stacker.commands import Stacker
if __name__ == "__main__":
stacker = Stacker(setup_logging=setup_logging)
args = stacker.parse_args()
stacker.configure(args)
args.run(args)