mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Upload on freehosting.com
This commit is contained in:
parent
9deddaaecd
commit
d573b1ba33
1 changed files with 7 additions and 5 deletions
|
@ -28,8 +28,10 @@ options_arm = [[("", "EXT=FRSKY")],
|
||||||
|
|
||||||
languages = ["en", "fr", "se"]
|
languages = ["en", "fr", "se"]
|
||||||
|
|
||||||
host = "ftpperso.free.fr"
|
#host = "ftpperso.free.fr"
|
||||||
user = "open9x"
|
#user = "open9x"
|
||||||
|
host = "open9x.freehosting.com"
|
||||||
|
user = "openxfre"
|
||||||
password = None
|
password = None
|
||||||
ftp_connection = None
|
ftp_connection = None
|
||||||
ftp_tmpdir = None
|
ftp_tmpdir = None
|
||||||
|
@ -45,12 +47,12 @@ def openFtp():
|
||||||
|
|
||||||
ftp_connection = ftplib.FTP(host, user, password)
|
ftp_connection = ftplib.FTP(host, user, password)
|
||||||
if ftp_tmpdir is None:
|
if ftp_tmpdir is None:
|
||||||
ftp_tmpdir = "binaries/temp" + str(int(time.mktime(time.localtime())))
|
ftp_tmpdir = "public_html/binaries/temp" + str(int(time.mktime(time.localtime())))
|
||||||
ftp_connection.mkd(ftp_tmpdir)
|
ftp_connection.mkd(ftp_tmpdir)
|
||||||
|
|
||||||
def closeFtp():
|
def closeFtp():
|
||||||
# ftp_connection.rename("binaries/latest", "binaries/r...")
|
# ftp_connection.rename("binaries/latest", "binaries/r...")
|
||||||
ftp_connection.rename(ftp_tmpdir, "binaries/latest")
|
ftp_connection.rename(ftp_tmpdir, "public_html/binaries/latest")
|
||||||
ftp_connection.quit()
|
ftp_connection.quit()
|
||||||
|
|
||||||
def uploadBinary(binary_name):
|
def uploadBinary(binary_name):
|
||||||
|
@ -222,7 +224,7 @@ if __name__ == "__main__":
|
||||||
generate_c9x_list("../../companion9x/src/open9x-v4-binaries.cpp", hexes, "hex", "OPEN9X_STAMP", "BOARD_GRUVIN9X")
|
generate_c9x_list("../../companion9x/src/open9x-v4-binaries.cpp", hexes, "hex", "OPEN9X_STAMP", "BOARD_GRUVIN9X")
|
||||||
|
|
||||||
# stamp
|
# stamp
|
||||||
subprocess.check_output(["make", "stamp"])
|
subprocess.Popen(["make", "stamp"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd="../src").wait()
|
||||||
|
|
||||||
if upload:
|
if upload:
|
||||||
closeFtp()
|
closeFtp()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue