-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_once.py
executable file
·36 lines (29 loc) · 1.29 KB
/
deploy_once.py
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
#!/usr/bin/env python3
"""
Simple stub that calls the 'real' deploy_once.py in the git submodule without an
additional path prefix. Passes along any parameters without modification.
For usage, optional arguments, syntax, etc. please refer to the RoboLab Docs
which are accessible at https://robolab.inf.tu-dresden.de.
This module: https://bitbucket.org/tudrobolab/robolab-template
The submodule: https://bitbucket.org/tudrobolab/robolab-deploy
Part of the RoboLab Project
Systems Engineering Group, Faculty of Computer Science, TU Dresden
Copyright (c) 2017-2019 by Lutz Thies, Samuel Knobloch
Released under the MIT License
"""
import subprocess
import sys
# Store path to executable
DEPLOY_EXECUTABLE = "./robolab-deploy/deploy.py"
# Windows-Fix: Get the full executable path, windows can't handle our shebang
PYTHON_EXECUTABLE = sys.executable
# Check if the "robolab-deploy-lite" submodule is available
try:
with open(DEPLOY_EXECUTABLE) as f:
f.close()
except FileNotFoundError:
print("You forgot to use the --recursive flag while cloning this repository!")
print("Please run: git submodule update --init --recursive")
except IOError:
print("Submodule found but not accessible; please check for correct permissions!")
subprocess.call([PYTHON_EXECUTABLE, DEPLOY_EXECUTABLE] + sys.argv[1:])