Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
eoa2-xmldb/scripts/exec_in_xmldb.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
32 lines (23 sloc)
636 Bytes
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
#!/usr/bin/env python3 | |
from utils.settings import BASE_DIR, load_config | |
from utils.functions import exec_in_xmldb | |
from pathlib import Path | |
import os | |
if __name__ == '__main__': | |
from argparse import ArgumentParser | |
config = load_config() | |
parser = ArgumentParser( | |
description="open a shell to the xml database. (executes 'docker-compose exec xmldb java -jar start.jar client --no-gui $@')" | |
) | |
parser.add_argument( | |
"CMD", | |
nargs='*', | |
) | |
args = parser.parse_args() | |
CMDS= \ | |
(vars(args)['CMD']) | |
print( CMDS ) | |
exec_in_xmldb( | |
*CMDS, | |
env=config | |
) |