示例#1
0
 def tools(self):
     pkgs = abdala.local(self.ver3).listing()
     for i in pkgs:
         print(green + " [+]" + default + " Attemping to update %s" % i[0])
         if i[1] == "git":
             path = "/usr/share/%s" % i[0]
             check_call("cd %s && sudo git pull" % path, shell=True)
         else:
             ver = connect(self.ver3).dependencies(i[0], True)
             if ver == i[1]:
                 print("Already up to date")
             else:
                 atom.actions(self.ver3).uninstall(i, False, False, True)
                 atom.actions(self.ver3).install(i, True)
示例#2
0
	def tools(self):
		pkgs = abdala.local(self.ver3).listing()
		for i in pkgs:
			print(green + " [+]" + default + " Attemping to update %s" % i[0])
			if i[1] == "git":
				path = "/usr/share/%s" % i[0]
				check_call("cd %s && sudo git pull" % path, shell = True)
			else:
				ver = connect(self.ver3).dependencies(i[0], True)
				if ver == i[1]:
					print("Already up to date")
				else:
					atom.actions(self.ver3).uninstall(i, False, False, True)
					atom.actions(self.ver3).install(i, True)
示例#3
0
文件: organon.py 项目: r3p3r/organon
def main():
    core = atom.actions(ver3, distro, arch)

    #Check if organon is correctly installed
    #core.check_install()

    ### - OPEN MAN PAGE - ###
    if args.about:
        system("man organon")

    ### - RETURN VERSION - ###
    if args.version:
        print("Version: ", __VERSION__)
        print("Last revision", __DATE__)

    ### - CLEAN ORGANON CACHE - ###
    if args.clean:
        print(" [!] Cleaning cache")
        system("sudo rm -rf /var/cache/organon/*")

    ### - UPDATE ORGANON - ###
    if args.U:
        core.update_organon()

    ### - UPDATE PACKAGES - ###
    if args.u:
        core.update_packages()

    ### - INSTALL PROGRAM - ###
    elif args.i:
        core.install(args.i, args.yes)

    ### - REMOVE PROGRAM - ###
    elif args.r:
        conf = False
        deps = False
        if args.conf == True and args.deps == True:
            conf = True
            deps = True

        elif args.conf == True and args.deps == False:
            conf = True
            deps = False

        elif args.conf == False and args.deps == True:
            conf = False
            deps = True

        core.uninstall(args.r, conf, deps, args.yes)

    ### - SYNCHRONIZE DATABASE - ###
    elif args.S:
        core.sync_db()

    ### - SEARCH IN DATABASE - ###
    elif args.s:
        core.search_db(args.s)

    ### - LIST DATABASE - ###
    elif args.L:
        core.enum_db()

    ### - LIST INSTALLED TOOLS - ###
    elif args.Li:
        core.installed()
示例#4
0
def main():
	core = atom.actions(ver3, distro, arch)

	#Check if organon is correctly installed
	#core.check_install()
	
	### - OPEN MAN PAGE - ###
	if args.about:
		system("man organon")
	
	### - RETURN VERSION - ###
	if args.version:
		print("Version: ", __VERSION__)
		print("Last revision", __DATE__)

	### - CLEAN ORGANON CACHE - ###
	if args.clean:
		print(" [!] Cleaning cache")
		system("sudo rm -rf /var/cache/organon/*")

	### - UPDATE ORGANON - ###
	if args.U:
		core.update_organon()

	### - UPDATE PACKAGES - ###
	if args.u:
		core.update_packages()

	### - INSTALL PROGRAM - ###
	elif args.i:
		core.install(args.i, args.yes)

	### - REMOVE PROGRAM - ###
	elif args.r:
		conf = False
		deps = False
		if args.conf == True and args.deps == True:
			conf = True
			deps = True

		elif args.conf == True and args.deps == False:
			conf = True
			deps = False

		elif args.conf == False and args.deps == True:
			conf = False
			deps = True

		core.uninstall(args.r, conf, deps, args.yes)

	### - SYNCHRONIZE DATABASE - ###
	elif args.S:
		core.sync_db()

	### - SEARCH IN DATABASE - ###
	elif args.s:
		core.search_db(args.s)

	### - LIST DATABASE - ###
	elif args.L:
		core.enum_db()
	
	### - LIST INSTALLED TOOLS - ###
	elif args.Li:
		core.installed()