This commit is contained in:
BarsTiger
2022-01-24 13:17:49 +02:00
parent e5e216ca75
commit cce55d434a
4 changed files with 35 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ from modules.manager import install, uninstall
from modules.virustotal import add_to_cfg
from modules.uploader import upload
from modules.source import get_source
import modules.vars as horsy_vars
# Getting the arguments
parser = argparse.ArgumentParser(description='horsy - the best package manager')
@@ -24,10 +25,10 @@ option = args.option
app = args.app
# Checking directories and files
if not os.path.exists('apps'):
os.makedirs('apps')
if not os.path.isfile('config.cfg'):
with open('config.cfg', 'w') as f:
if not os.path.exists(horsy_vars.horsypath + 'apps'):
os.makedirs(horsy_vars.horsypath + 'apps')
if not os.path.isfile(horsy_vars.horsypath + 'config.cfg'):
with open(horsy_vars.horsypath + 'config.cfg', 'w') as f:
f.write('{}')
# Displaying the logo
@@ -49,7 +50,9 @@ isNoArgs = False
if args.vt_key:
if args.vt_key != 'disable':
add_to_cfg(args.vt_key)
print('VT key updated')
else:
print('VT disabled')
add_to_cfg(None)
sys.exit()