-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bin/medusa-wrapper to package's installed scripts (#738)
- Loading branch information
Showing
4 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
import subprocess | ||
import sys | ||
import os | ||
|
||
|
||
def main(): | ||
# Adjust the path to where your actual shell script is located | ||
script_dir = os.path.join(os.path.dirname(__file__)) | ||
script_path = os.path.join(script_dir, 'medusa-wrapper.sh') | ||
args = sys.argv[1:] | ||
command = [script_path] + args | ||
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
stdout, stderr = p.communicate() | ||
if stderr: | ||
print(stderr, file=sys.stderr) | ||
if stdout: | ||
print(stdout, file=sys.stdout) | ||
rc = p.returncode | ||
sys.exit(rc) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters