-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharco_install.py
executable file
·31 lines (25 loc) · 1.41 KB
/
arco_install.py
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
import argparse
from arco_install.format_software import export_to_file
from arco_install.installer import install, clear_cache, update, export_scripts
import arco_install
def main():
parser = argparse.ArgumentParser( description="Install the required packages", exit_on_error=True )
parser.add_argument("-a", "--all", action="store_true", help="Install all software")
parser.add_argument("-c", "--compilable", action="store_true", help="Install software from AUR, snap...", )
parser.add_argument("-d", "--distro", action="store_true", help="Install software from distribution and communnity", )
parser.add_argument("-s", "--script", action="store_true", help="Run software by command line" )
parser.add_argument("-e", "--export", action="store_true", help="Build bashscript installation file" )
args = parser.parse_args()
export_to_file()
if all(value == False for value in vars(args).values()):
parser.print_help()
return
if args.export: export_scripts(arco_install.RepositoryValues.ALL)
else:
update()
if args.all: [install(r) for r in arco_install.RepositoryValues.ALL]
if args.compilable: [install(r) for r in arco_install.RepositoryValues.COMPILABLE]
if args.distro: [install(r) for r in arco_install.RepositoryValues.DISTRO]
if args.script: [install(r) for r in arco_install.RepositoryValues.SCRIPT]
clear_cache()
main()