~xubuntu-dev/ubuntu-cdimage/xubuntu-base

« back to all changes in this revision

Viewing changes to bin/publish-daily

  • Committer: Adam Conrad
  • Date: 2015-08-06 08:04:06 UTC
  • Revision ID: adconrad@0c3.net-20150806080406-altjtz2xv5tubg80
Tidy up ALL_PROJECTS a bit

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import sys
23
23
 
24
24
sys.path.insert(0, os.path.join(sys.path[0], os.pardir, "lib"))
25
 
from cdimage.config import config
 
25
from cdimage.config import Config
26
26
from cdimage.tree import Publisher, Tree
27
27
 
28
28
 
29
29
def main():
30
30
    parser = OptionParser("%prog DATE [IMAGE_TYPE]")
31
 
    options, args = parser.parse_args()
 
31
    _, args = parser.parse_args()
32
32
    if len(args) < 1:
33
33
        parser.error("need date")
34
34
    date = args[0]
35
35
    image_type = args[1] if len(args) >= 2 else "daily"
 
36
    config = Config()
36
37
    tree = Tree.get_daily(config)
37
38
    Publisher.get_daily(tree, image_type).publish(date)
38
39