-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
48 lines (44 loc) · 1.36 KB
/
Copy pathmain.py
File metadata and controls
48 lines (44 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import pacmanwrapper
import diskutil
import sys
import os
import flet
import ui
if __name__ == "__main__":
for argv in sys.argv:
if argv == "testmode":
print("I'm running at testmode. All of the operations will applied on disk.img")
os.system("losetup -f disk.img")
os.system("kpartx -a /dev/loop0")
print("""Easy Arch v.0.1""")
# disk=diskutil.StorageDevice("/dev/loop0")
#
# disk.init()
# disk.getPartInfofromNumber(-1)
# print(disk.lastPartInfo()["number"])
#
# disk.addPartition(48,"ext4","normal")
# print(disk.lastPartInfo()["number"])
# pac = pacmanwrapper.Pacman()
# pres = pac.install_pkg("micro")
#
# print(pres)
#
# while True:
# if len(pres) < 2 and pres[0] == True:
# print("Package Installed")
# break
#
# if pres[0] and pres[1]: #Package Already Installed,
# if pres[2]:
# print("Package Already Installed, Package Updated!!!")
# break
# else:
# print("Package is already installed and up to date")
# break
#
# pac.check_package("micro")
# pac.remove_pkg("micro")
# pacmanwrapper.add_pkg_to_txt("python","packagelist")
# pacmanwrapper.check_package_exists("python","packagelist")
flet.app(target=ui.main)