]> xn--ix-yja.es Git - alex.git/commitdiff
Replace ruscreen with Python pipx-installable script
authoralex <alex@pdp7.net>
Tue, 17 Oct 2023 18:29:50 +0000 (20:29 +0200)
committeralex <alex@pdp7.net>
Tue, 17 Oct 2023 18:30:14 +0000 (20:30 +0200)
scripts/p7s/__init__.py [new file with mode: 0644]
scripts/p7s/__pycache__/__init__.cpython-39.pyc [new file with mode: 0644]
scripts/p7s/__pycache__/ruscreen.cpython-39.pyc [new file with mode: 0644]
scripts/p7s/ruscreen.py [new file with mode: 0644]
scripts/pyproject.toml [new file with mode: 0644]
scripts/ruscreen [deleted file]

diff --git a/scripts/p7s/__init__.py b/scripts/p7s/__init__.py
new file mode 100644 (file)
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 (file)
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 (file)
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 (file)
index 0000000..d12dc2f
--- /dev/null
@@ -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 (file)
index 0000000..ad8aef7
--- /dev/null
@@ -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 (executable)
index e9991ee..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec autossh -M 0 -t "$@" "screen -RdU"