-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.py
34 lines (27 loc) · 847 Bytes
/
release.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import json
import os
from pathlib import Path
import shutil
from telegram import Bot
from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Updater
BOT_TOKEN = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
BOT = Bot(token=BOT_TOKEN)
UPDATER = Updater(bot=BOT, use_context=True)
TG_CHAT = "@PixysOS"
def send_message(message):
shutil.copy2('/src/dir/file.ext', '/dst/dir/newname.ext')
def main():
FILENAME = os.environ("FILENAME")
DEVICE = os.environ("DEVICE")
if 'GAPPS' in FILENAME:
FOLDER = 'ten_gapps'
else:
FOLDER = 'ten'
if FILENAME and DEVICE:
build_path = "/home/ftp/uploads/.test/" + DEVICE + "/" + FOLDER + "/" + FILENAME
else:
MESSAGE = "Error FILENAME or DEVICE not defined"
send_message_maintainers()
rom_file = Path(build_path)
if rom_file.exists():