props/scripts/load_shop_modules.py

27 lines
631 B
Python
Raw Normal View History

from glob import glob
import os
import shutil
2022-04-24 05:12:32 +00:00
PROP_SHOP_MODULES_DIR = "./Props.Shop/"
PROPS_SHOP_MODULES_DST = "./Props/shops/"
NET_VER = "net6.0"
SHOP_MODULE_GLOB = "**/bin/Release/{net_ver}/publish/*.{ext}"
EXTS = ["deps.json", "dll"]
def load():
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir("..")
for ext in EXTS:
2022-04-24 05:12:32 +00:00
results = glob(os.path.join(PROP_SHOP_MODULES_DIR,
SHOP_MODULE_GLOB.format(net_ver=NET_VER, ext=ext)))
for result in results:
2022-04-24 05:12:32 +00:00
shutil.copy(result, os.path.abspath(PROPS_SHOP_MODULES_DST))
if __name__ == "__main__":
load()