mirror of
https://github.com/babysor/MockingBird.git
synced 2024-03-22 13:11:31 +08:00
16 lines
394 B
Python
16 lines
394 B
Python
|
import os
|
||
|
import shutil
|
||
|
|
||
|
|
||
|
class AttrDict(dict):
|
||
|
def __init__(self, *args, **kwargs):
|
||
|
super(AttrDict, self).__init__(*args, **kwargs)
|
||
|
self.__dict__ = self
|
||
|
|
||
|
|
||
|
def build_env(config, config_name, path):
|
||
|
t_path = os.path.join(path, config_name)
|
||
|
if config != t_path:
|
||
|
os.makedirs(path, exist_ok=True)
|
||
|
shutil.copyfile(config, os.path.join(path, config_name))
|