Revision ae48a082 image_creator/main.py
b/image_creator/main.py | ||
---|---|---|
1 |
#!/usr/bin/env python |
|
2 |
|
|
1 | 3 |
# Copyright 2011 GRNET S.A. All rights reserved. |
2 | 4 |
# |
3 | 5 |
# Redistribution and use in source and binary forms, with or |
... | ... | |
129 | 131 |
|
130 | 132 |
if options.sysprep: |
131 | 133 |
image_os.sysprep() |
132 |
|
|
134 |
|
|
133 | 135 |
if options.cleanup: |
134 | 136 |
image_os.data_cleanup() |
135 | 137 |
|
... | ... | |
137 | 139 |
|
138 | 140 |
size = options.shrink and dev.shrink() or dev.size() |
139 | 141 |
metadata['size'] = str(size // 2 ** 20) |
140 |
|
|
142 |
|
|
141 | 143 |
outfile = "" |
142 | 144 |
if options.outfile is not None: |
143 | 145 |
outfile = options.outfile |
... | ... | |
160 | 162 |
|
161 | 163 |
#The image is ready, lets call kamaki if necessary |
162 | 164 |
if options.upload: |
163 |
pass |
|
165 |
pass
|
|
164 | 166 |
|
165 | 167 |
if options.outfile is None: |
166 | 168 |
os.unlink(outfile) |
... | ... | |
170 | 172 |
COLOR_BLACK = "\033[00m" |
171 | 173 |
COLOR_RED = "\033[1;31m" |
172 | 174 |
|
175 |
|
|
173 | 176 |
def main(): |
174 | 177 |
try: |
175 | 178 |
ret = image_creator() |
... | ... | |
181 | 184 |
|
182 | 185 |
if __name__ == '__main__': |
183 | 186 |
main() |
187 |
|
|
184 | 188 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
Also available in: Unified diff