STC-Solution-POC / main.py
E-slam's picture
Update main.py
b95f10a verified
raw
history blame contribute delete
659 Bytes
import os
import time
import shutil
import subprocess
gh_token = os.getenv("gh_token")
url_with_token = f"https://{gh_token}@github.com/Eslam-Magdy-1297/MetraGroup-STC-POC.git"
os.system(f"git clone {url_with_token}")
time.sleep(10)
source_dir = "MetraGroup-STC-POC"
destination_dir = "."
import os
current_directory = os.getcwd()
items = os.listdir(current_directory)
for item in items:
print(item)
for item in os.listdir(source_dir):
s = os.path.join(source_dir, item)
d = os.path.join(destination_dir, item)
shutil.move(s, d)
os.rmdir(source_dir)
with open("index.py", "r") as file:
code = file.read()
exec(code)