Add remaining scripts to Debian package
This commit is contained in:
parent
e6792fc8e9
commit
02c7ebc9cd
20 changed files with 480 additions and 28 deletions
25
pyinstaller/mimic3-client
Executable file
25
pyinstaller/mimic3-client
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2022 Mycroft AI Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Stub script to execute web client in PyInstaller distribution.
|
||||
#
|
||||
|
||||
# Directory of *this* script
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
"${this_dir}/mimic3" --subprogram client "$@"
|
||||
25
pyinstaller/mimic3-download
Executable file
25
pyinstaller/mimic3-download
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2022 Mycroft AI Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Stub script to execute download tool in PyInstaller distribution.
|
||||
#
|
||||
|
||||
# Directory of *this* script
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
"${this_dir}/mimic3" --subprogram download "$@"
|
||||
|
|
@ -14,8 +14,12 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Stub script to execute web server in PyInstaller distribution.
|
||||
#
|
||||
|
||||
# Directory of *this* script
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
"${this_dir}/mimic3" --server "$@"
|
||||
"${this_dir}/mimic3" --subprogram server "$@"
|
||||
|
|
|
|||
|
|
@ -15,14 +15,25 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
"""Stub for PyInstaller"""
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(add_help=False)
|
||||
parser.add_argument("--subprogram", choices=["server", "client", "download"])
|
||||
known_args, rest_args = parser.parse_known_args()
|
||||
|
||||
|
||||
if (len(sys.argv) > 1) and (sys.argv[1] == "--server"):
|
||||
if known_args.subprogram == "server":
|
||||
from mimic3_http.__main__ import main as http_main
|
||||
|
||||
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
||||
http_main()
|
||||
http_main(argv=rest_args)
|
||||
elif known_args.subprogram == "client":
|
||||
from mimic3_http.client import main as client_main
|
||||
|
||||
client_main(argv=rest_args)
|
||||
elif known_args.subprogram == "download":
|
||||
from mimic3_tts.download import main as download_main
|
||||
|
||||
download_main(argv=rest_args)
|
||||
else:
|
||||
from mimic3_tts.__main__ import main as tts_main
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue