dotlocalslashbin 0.0.11__tar.gz → 0.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dotlocalslashbin-0.0.11 → dotlocalslashbin-0.0.12}/PKG-INFO +1 -1
- {dotlocalslashbin-0.0.11 → dotlocalslashbin-0.0.12}/src/dotlocalslashbin.py +7 -5
- {dotlocalslashbin-0.0.11 → dotlocalslashbin-0.0.12}/LICENSES/MPL-2.0.txt +0 -0
- {dotlocalslashbin-0.0.11 → dotlocalslashbin-0.0.12}/README.md +0 -0
- {dotlocalslashbin-0.0.11 → dotlocalslashbin-0.0.12}/pyproject.toml +0 -0
|
@@ -23,8 +23,9 @@ from urllib.request import urlopen
|
|
|
23
23
|
from zipfile import ZipFile
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
__version__ = "0.0.
|
|
26
|
+
__version__ = "0.0.12"
|
|
27
27
|
|
|
28
|
+
_HOME = str(Path("~").expanduser())
|
|
28
29
|
_OUTPUT = Path("~/.local/bin/")
|
|
29
30
|
_SHA512_LENGTH = 128
|
|
30
31
|
|
|
@@ -48,7 +49,7 @@ class Item:
|
|
|
48
49
|
action: Action
|
|
49
50
|
downloaded: Path
|
|
50
51
|
expected: str | None
|
|
51
|
-
version: str
|
|
52
|
+
version: str
|
|
52
53
|
prefix: str
|
|
53
54
|
command: str | None
|
|
54
55
|
ignore: set
|
|
@@ -69,7 +70,7 @@ def main() -> int:
|
|
|
69
70
|
item.target = Path(record.get("target", default)).expanduser()
|
|
70
71
|
item.ignore = record.get("ignore", set())
|
|
71
72
|
item.expected = record.get("expected", None)
|
|
72
|
-
item.version = record.get("version",
|
|
73
|
+
item.version = record.get("version", "")
|
|
73
74
|
item.prefix = record.get("prefix", "")
|
|
74
75
|
item.command = record.get("command", None)
|
|
75
76
|
|
|
@@ -88,8 +89,9 @@ def main() -> int:
|
|
|
88
89
|
print(f"Error {e.code} downloading {e.url}")
|
|
89
90
|
return 1
|
|
90
91
|
|
|
91
|
-
arg0 =
|
|
92
|
-
|
|
92
|
+
arg0 = str(item.target.absolute())
|
|
93
|
+
prompt = "#" if item.version else "$"
|
|
94
|
+
print(" ".join((prompt, arg0.replace(_HOME, "~"), item.version)))
|
|
93
95
|
if item.version:
|
|
94
96
|
run([arg0, item.version], check=True)
|
|
95
97
|
print()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|