freelance-project-34-market.../m
2024-09-30 23:29:37 +03:00

38 lines
793 B
Python
Executable File

#!/usr/bin/env python3
#vim: set filetype=python
import sys
import optparse
import subprocess
import os
def js(argv):
return subprocess.check_call([
'sudo',
'docker-compose',
'--project-directory',
os.path.abspath(
os.path.dirname(__file__),
),
'-f',
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'docker', 'js',
'docker-compose.yml',
)
),
*argv,
])
if len(sys.argv) > 1 and sys.argv[1] == 'js':
js(sys.argv[2:])
elif len(sys.argv) > 1 and sys.argv[1] == 'mypy':
subprocess.check_call([
'mypy',
'--strict',
'dotfiles/.local/bin/commands',
])
else:
raise NotImplementedError