addftool 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl
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.
- addftool/blob.py +22 -0
- {addftool-0.0.2.dist-info → addftool-0.0.3.dist-info}/METADATA +1 -1
- addftool-0.0.3.dist-info/RECORD +9 -0
- addftool-0.0.2.dist-info/RECORD +0 -9
- {addftool-0.0.2.dist-info → addftool-0.0.3.dist-info}/LICENSE +0 -0
- {addftool-0.0.2.dist-info → addftool-0.0.3.dist-info}/WHEEL +0 -0
- {addftool-0.0.2.dist-info → addftool-0.0.3.dist-info}/entry_points.txt +0 -0
- {addftool-0.0.2.dist-info → addftool-0.0.3.dist-info}/top_level.txt +0 -0
addftool/blob.py
CHANGED
|
@@ -45,7 +45,29 @@ def create_dir_for_current_user(dir_path, sudo=False):
|
|
|
45
45
|
execute_command(command)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def check_package_installed(package):
|
|
49
|
+
command = f"dpkg -l | grep {package}"
|
|
50
|
+
result = execute_command(command)
|
|
51
|
+
if result is not None and package in result:
|
|
52
|
+
return True
|
|
53
|
+
return False
|
|
54
|
+
|
|
55
|
+
|
|
48
56
|
def install_main(args):
|
|
57
|
+
|
|
58
|
+
to_install = []
|
|
59
|
+
for package in args.packages.split():
|
|
60
|
+
if check_package_installed(package):
|
|
61
|
+
print(f"{package} is already installed")
|
|
62
|
+
continue
|
|
63
|
+
to_install.append(package)
|
|
64
|
+
|
|
65
|
+
if len(to_install) == 0:
|
|
66
|
+
print("All packages are already installed")
|
|
67
|
+
return
|
|
68
|
+
else:
|
|
69
|
+
args.packages = " ".join(to_install)
|
|
70
|
+
|
|
49
71
|
# generate install script
|
|
50
72
|
if args.output_script is not None:
|
|
51
73
|
script_writer = open(args.output_script, "w")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
addftool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
addftool/blob.py,sha256=iD4CJgMhk4ooFZ1rb7NLHxXT6aG--_QrjqFlecGWSeE,7017
|
|
3
|
+
addftool/util.py,sha256=gx-pqNJk31tmWtRJvZrIkI15ER7QZg9FtaM_OyP0JqU,975
|
|
4
|
+
addftool-0.0.3.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
|
|
5
|
+
addftool-0.0.3.dist-info/METADATA,sha256=ov_H_kPjm_Rw2Ihdb_MNsrtHSxEiXWpu5R29NrIeLWo,149
|
|
6
|
+
addftool-0.0.3.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
7
|
+
addftool-0.0.3.dist-info/entry_points.txt,sha256=H3Z3iWsLB1CFdckedIA652_3tWaNS5Rl7fFWgFaFRIc,48
|
|
8
|
+
addftool-0.0.3.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
|
|
9
|
+
addftool-0.0.3.dist-info/RECORD,,
|
addftool-0.0.2.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
addftool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
addftool/blob.py,sha256=bPtnt0T79jdkMjdJFp_wExvaoxlclbhw9cTw7Iug3rY,6437
|
|
3
|
-
addftool/util.py,sha256=gx-pqNJk31tmWtRJvZrIkI15ER7QZg9FtaM_OyP0JqU,975
|
|
4
|
-
addftool-0.0.2.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
|
|
5
|
-
addftool-0.0.2.dist-info/METADATA,sha256=qv43J1fLZpinNN5oGkExEcoVsDCHAuots7BrWTkw1So,149
|
|
6
|
-
addftool-0.0.2.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
7
|
-
addftool-0.0.2.dist-info/entry_points.txt,sha256=H3Z3iWsLB1CFdckedIA652_3tWaNS5Rl7fFWgFaFRIc,48
|
|
8
|
-
addftool-0.0.2.dist-info/top_level.txt,sha256=jqj56-plrBbyzY0tIxB6wPzjAA8kte4hUlajyyQygN4,9
|
|
9
|
-
addftool-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|