This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
Kosmos/Modules/merger.py
jakibaki 915e7f2dcc v11
2020-02-26 19:53:52 -05:00

42 lines
1.5 KiB
Python

#!/usr/bin/env python
# Merges all modules together because I'm lazy ;^)
import subprocess as sbp
import os
import shutil
import time
modules = ["appstore", "bootlogo", "checkpoint", "edizon", "es_patches",
"hbmenu", "hekate_payload", "must_have", "kosmosupdater",
"sys-ftpd", "sys-netcheat", "sdfiles_toolkit",
"tinfoil"] # Everything that will be merged together
p2 = "compiled" # How the merged folder should be called
print("""
https://github.com/tumGER/
_____ _____ ______ _ _ _____ _ _ _
/ ____| __ \| ____(_) | / ____| (_) | | |
| (___ | | | | |__ _| | ___ ___| (_____ ___| |_ ___| |__
\___ \| | | | __| | | |/ _ \/ __|\___ \ \ /\ / / | __/ __| '_ \
____) | |__| | | | | | __/\__ \____) \ V V /| | || (__| | | |
|_____/|_____/|_| |_|_|\___||___/_____/ \_/\_/ |_|\__\___|_| |_|
By: @_tomGER (tumGER on Github)
It could be that a permissions error will pop up, fix it by restarting the python script! We don\'t really know why that happens!
""") # Fancy stuff
if os.path.exists("compiled"):
shutil.rmtree("compiled") # Delete Content of "compiled" if it exists!
os.makedirs("compiled") # Double check
for path in modules:
fol = os.listdir(path)
for i in fol:
p1 = os.path.join(path,i)
p3 = 'cp -r ' + p1 +' ' + p2+'/.'
sbp.Popen(p3,shell=True)
time.sleep(0.1)
print("Done!")