diff options
| author | alex <alex@pdp7.net> | 2023-10-17 20:29:50 +0200 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-10-17 20:30:14 +0200 |
| commit | efed7707c9f9a18425239ce91405132ebd8ace01 (patch) | |
| tree | 3d58a975ace957754afe7c2235bf18f595d92cca /scripts | |
| parent | 32cd86df7cd8619ef0f957860f0312080aab2a91 (diff) | |
Replace ruscreen with Python pipx-installable script
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/p7s/__init__.py | 0 | ||||
| -rw-r--r-- | scripts/p7s/__pycache__/__init__.cpython-39.pyc | bin | 0 -> 138 bytes | |||
| -rw-r--r-- | scripts/p7s/__pycache__/ruscreen.cpython-39.pyc | bin | 0 -> 368 bytes | |||
| -rw-r--r-- | scripts/p7s/ruscreen.py | 6 | ||||
| -rw-r--r-- | scripts/pyproject.toml | 17 | ||||
| -rwxr-xr-x | scripts/ruscreen | 3 |
6 files changed, 23 insertions, 3 deletions
diff --git a/scripts/p7s/__init__.py b/scripts/p7s/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/scripts/p7s/__init__.py diff --git a/scripts/p7s/__pycache__/__init__.cpython-39.pyc b/scripts/p7s/__pycache__/__init__.cpython-39.pyc Binary files differnew file mode 100644 index 00000000..483c7b9c --- /dev/null +++ b/scripts/p7s/__pycache__/__init__.cpython-39.pyc diff --git a/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc b/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc Binary files differnew file mode 100644 index 00000000..54485b11 --- /dev/null +++ b/scripts/p7s/__pycache__/ruscreen.cpython-39.pyc diff --git a/scripts/p7s/ruscreen.py b/scripts/p7s/ruscreen.py new file mode 100644 index 00000000..d12dc2f5 --- /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 00000000..ad8aef7a --- /dev/null +++ b/scripts/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "p7s" +version = "0.1.0" +description = "" +authors = ["alex <alex@pdp7.net>"] + +[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 e9991eeb..00000000 --- a/scripts/ruscreen +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec autossh -M 0 -t "$@" "screen -RdU" |
