示例#1
0
def installPackets():
    with open('../packets.json', 'r') as f:
      packets = listui.askDialog("Packets", json.loads(f.read()))
      if len(packets) < 1:
      	return
      packetlist = " ".join(packets)
      install_packets = INSTALL + packetlist
      cmd = SUDO + "'" + UPDATE + UPGRADE + install_packets + "'"
      os.system(cmd)
示例#2
0
def installPackets():
    with open('../installers.json', 'r') as f:
      packets = listui.askDialog("Install", json.loads(f.read()))
      if len(packets) < 1:
        return
      installercalls = ""
      for packet in packets:
      	installercalls += "../installers/" + packet + ".sh; "
      cmd = SUDO + "'apt-get install -y python-software-properties; " + installercalls + "'"
      os.system(cmd)