<s> from optparse import OptionParser <EOL> import sys <EOL> from command import Command <EOL> from up import UpCommand <EOL> from down import DownCommand <EOL> class RebuildCommand ( Command ) : <EOL> def init_parser ( self ) : <EOL> usage = "<STR_LIT>" <EOL> parser = OptionParser ( usage = usage ) <EOL> parser . add_option ( '<STR_LIT>' , '<STR_LIT>' , <EOL> action = '<STR_LIT:store_true>' , dest = '<STR_LIT>' , default = False , <EOL> help = '<STR_LIT>' ) <EOL> parser . add_option ( '<STR_LIT>' , '<STR_LIT>' , <EOL> action = '<STR_LIT:store_true>' , dest = '<STR_LIT>' , default = False , <EOL> help = '<STR_LIT>' ) <EOL> self . parser = parser <EOL> def run ( self ) : <EOL> ( options , _ ) = self . parser . parse_args ( ) <EOL> sys . stdout . write ( "<STR_LIT>" ) <EOL> sys . argv = [ sys . argv [ <NUM_LIT:0> ] ] <EOL> if options . force : <EOL> sys . argv . append ( '<STR_LIT>' ) <EOL> if options . verbose : <EOL> sys . argv . append ( '<STR_LIT>' ) <EOL> sys . argv . append ( '<STR_LIT:all>' ) <EOL> DownCommand ( self . context ) . run ( ) <EOL> sys . stdout . write ( "<STR_LIT>" ) <EOL> sys . argv = [ sys . argv [ <NUM_LIT:0> ] ] <EOL> if options . force : <EOL> sys . argv . append ( '<STR_LIT>' ) <EOL> if options . verbose : <EOL> sys . argv . append ( '<STR_LIT>' ) <EOL> UpCommand ( self . context ) . run ( ) </s>
