2 The B{0install download} command-line interface.
5 # Copyright (C) 2011, Thomas Leonard
6 # See the README file for details, or visit http://0install.net.
8 from optparse
import OptionParser
12 from zeroinstall
import cmd
, SafeException
, _
13 from zeroinstall
.cmd
import UsageError
, select
14 from zeroinstall
.injector
import model
, autopolicy
, selections
, handler
18 def add_options(parser
):
19 select
.add_options(parser
)
20 parser
.add_option("", "--show", help=_("show where components are installed"), action
='store_true')
22 def handle(config
, options
, args
):
25 iface_uri
= model
.canonical_iface_uri(args
[0])
27 sels
= select
.get_selections(config
, options
, iface_uri
,
28 select_only
= False, download_only
= True, test_callback
= None)
30 sys
.exit(1) # Aborted by user
35 select
.show_human(sels
, config
.stores
)