<s> import os , sys , subprocess , json <EOL> from subprocess import call <EOL> config = json . loads ( open ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) ) . read ( ) ) <EOL> def main ( argv ) : <EOL> if argv : <EOL> target_dir = argv [ <NUM_LIT:0> ] <EOL> else : <EOL> target_dir = os . path . abspath ( config [ '<STR_LIT>' ] ) <EOL> if not os . path . isdir ( target_dir ) : <EOL> raise IOError ( "<STR_LIT>" + target_dir + "<STR_LIT>" ) <EOL> print "<STR_LIT>" , target_dir <EOL> for repo in config [ '<STR_LIT>' ] : <EOL> subprocess . call ( [ '<STR_LIT>' , '<STR_LIT>' , repo [ '<STR_LIT:url>' ] ] , cwd = target_dir ) <EOL> print "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( sys . argv [ <NUM_LIT:1> : ] ) </s>
