3 from zeroinstall
import zerostore
, SafeException
4 from zeroinstall
.zerostore
import cli
, manifest
7 if 'ENV_NOT_CLEARED' in os
.environ
:
8 raise SafeException("Environment not cleared. Check your sudoers file.")
10 if len(sys
.argv
) != 2:
11 raise cli
.UsageError('Usage: %s DIGEST' % sys
.argv
[0])
12 required_digest
= sys
.argv
[1]
14 manifest_data
= file('.manifest').read()
16 stores
= zerostore
.Stores()
18 manifest
.copy_tree_with_verify('.', stores
.get_first_system_store().dir,
19 manifest_data
, required_digest
)
20 except (IOError, SafeException
), ex
:
21 print >>sys
.stderr
, ex