From: alex Date: Tue, 17 Oct 2023 18:29:50 +0000 (+0200) Subject: Replace ruscreen with Python pipx-installable script X-Git-Tag: 20240214-emacs~204 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=efed7707c9f9a18425239ce91405132ebd8ace01;p=alex.git Replace ruscreen with Python pipx-installable script --- diff --git a/scripts/p7s/__init__.py b/scripts/p7s/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/p7s/__pycache__/__init__.cpython-39.pyc b/scripts/p7s/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..483c7b9 Binary files /dev/null and b/scripts/p7s/__pycache__/__init__.cpython-39.pyc differ diff --git a/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc b/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc new file mode 100644 index 0000000..54485b1 Binary files /dev/null and b/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc differ diff --git a/scripts/p7s/ruscreen.py b/scripts/p7s/ruscreen.py new file mode 100644 index 0000000..d12dc2f --- /dev/null +++ b/scripts/p7s/ruscreen.py @@ -0,0 +1,6 @@ +import os +import sys + + +def main(): + os.execvp("autossh", ["autossh", "-M", "0", "-t"] + sys.argv[1:] + ["screen -RdU"]) diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml new file mode 100644 index 0000000..ad8aef7 --- /dev/null +++ b/scripts/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "p7s" +version = "0.1.0" +description = "" +authors = ["alex "] + +[tool.poetry.dependencies] +python = "^3.9" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + + +[tool.poetry.scripts] +ruscreen = 'p7s.ruscreen:main' diff --git a/scripts/ruscreen b/scripts/ruscreen deleted file mode 100755 index e9991ee..0000000 --- a/scripts/ruscreen +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec autossh -M 0 -t "$@" "screen -RdU"