Fixed shop module loading script.
This commit is contained in:
parent
b4ec5844e4
commit
bd28df53de
@ -4,8 +4,8 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
PROP_SHOP_MODULES_DIR = "Props.Shop"
|
PROP_SHOP_MODULES_DIR = "./Props.Shop/"
|
||||||
PROPS_SHOP_MODULES_DST = "Props/shops"
|
PROPS_SHOP_MODULES_DST = "./Props/shops/"
|
||||||
NET_VER = "net6.0"
|
NET_VER = "net6.0"
|
||||||
|
|
||||||
SHOP_MODULE_GLOB = "**/bin/Release/{net_ver}/publish/*.{ext}"
|
SHOP_MODULE_GLOB = "**/bin/Release/{net_ver}/publish/*.{ext}"
|
||||||
@ -15,11 +15,11 @@ EXTS = ["deps.json", "dll"]
|
|||||||
def load():
|
def load():
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
os.chdir(PROP_SHOP_MODULES_DIR)
|
|
||||||
for ext in EXTS:
|
for ext in EXTS:
|
||||||
results = glob(SHOP_MODULE_GLOB.format(net_ver=NET_VER, ext=ext))
|
results = glob(os.path.join(PROP_SHOP_MODULES_DIR,
|
||||||
|
SHOP_MODULE_GLOB.format(net_ver=NET_VER, ext=ext)))
|
||||||
for result in results:
|
for result in results:
|
||||||
shutil.copy(result, PROPS_SHOP_MODULES_DST)
|
shutil.copy(result, os.path.abspath(PROPS_SHOP_MODULES_DST))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user