1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-24 02:37:05 +00:00
mailinabox/tools/list_all_packages.py
Joshua Tauberer 299a5c6355 dockerize (work in progress)
Docker support was initially worked on in 2bbb7a5e7e, but it never really worked.

This extends f7d7434012800c3572049af82a501743d4aed583 which was an old branch for docker work.
2015-06-18 08:05:38 -04:00

24 lines
576 B
Python

#!/usr/bin/python3
import os.path, glob, re
packages = set()
def add(line):
global packages
if line.endswith("\\"): line = line[:-1]
packages |= set(p for p in line.split(" ") if p not in("", "apt_install"))
for fn in glob.glob(os.path.join(os.path.dirname(__file__), "../setup/*.sh")):
with open(fn) as f:
in_apt_install = False
for line in f:
line = line.strip()
if line.startswith("apt_install "):
in_apt_install = True
if in_apt_install:
add(line)
in_apt_install = in_apt_install and line.endswith("\\")
print("\n".join(sorted(packages)))