def initialize(config): directory = config.workDirectory if os.path.exists(directory): sys.exit("Configured directory already exists, please make sure to use a non-existing directory") os.mkdir(directory) os.chdir(directory) git = Initializer(config) git.initalize() RTCInitializer.initialize(config) git.initialcommitandpush()
def initialize(config): directory = config.workDirectory if os.path.exists(directory): sys.exit( "Configured directory already exists, please make sure to use a non-existing directory" ) os.mkdir(directory) os.chdir(directory) git = Initializer(config) git.initalize() RTCInitializer.initialize(config) git.initialcommitandpush()
def initialize(): config = configuration.get() directory = config.workDirectory if os.path.exists(directory): sys.exit("Configured directory already exists, please make sure to use a non-existing directory") shouter.shout("Migration will take place in " + directory) os.makedirs(directory) os.chdir(directory) config.deletelogfolder() git = Initializer() git.initalize() RTCInitializer.initialize() if Differ.has_diff(): git.initialcommit() Commiter.pushmaster()