forked from Autodesk-AutoCAD/AutoLispExt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.py
More file actions
34 lines (23 loc) · 712 Bytes
/
publish.py
File metadata and controls
34 lines (23 loc) · 712 Bytes
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 os
import os.path
import shutil, errno
import platform
import sys
def download_artifactory_vsix():
if len(sys.argv) < 2:
sys.exit(2)
vsixUri = sys.argv[2]
print("downloading " + vsixUri)
os.system("curl -k -O " + vsixUri) # nosec
fileSize = os.path.getsize('autolispext.vsix')
print ("executed; file size: " + str(fileSize))
if fileSize < 102400:
print ("ERROR: file size of autolispext.vsix is too small; the downloading failed.")
sys.exit(3)
if __name__ == "__main__":
argLen = len(sys.argv)
if argLen < 1:
sys.exit(1)
print("argv[1] = " + sys.argv[1])
if sys.argv[1] == "down":
download_artifactory_vsix()