13
13
mkdir_cmd = local ["mkdir" ]["-p" ]
14
14
15
15
def getLinkFilename (link ):
16
- return link .split ("/" )[- 1 ]
16
+ return link .split ("#" )[ 0 ]. split ( " /" )[- 1 ]
17
17
18
18
def getLinkDir (link ):
19
+ if "#" in link :
20
+ return os .path .join (ngx_dir , link .split ("#" )[1 ])
19
21
return os .path .join (ngx_dir , getLinkFilename (link ).replace (".tar.gz" , "" ))
20
22
21
23
if local .cwd .split ("/" )[- 1 ]!= "ngx_http_websocket_stat_module" :
@@ -41,7 +43,7 @@ def download(links):
41
43
if os .path .exists (path ):
42
44
continue
43
45
print ("Downloading {}" .format (filename ))
44
- wget_cmd (link , '--directory-prefix' , download_dir )
46
+ wget_cmd (link . split ( "#" )[ 0 ] , '--directory-prefix' , download_dir )
45
47
46
48
def untar (links ):
47
49
for lib in links :
@@ -51,7 +53,7 @@ def untar(links):
51
53
52
54
def make (links ):
53
55
for lib in links :
54
- if lib == "nginx" :
56
+ if lib . startswith ( "nginx" ) :
55
57
continue
56
58
filename = getLinkFilename (links [lib ])
57
59
directory = getLinkDir (links [lib ])
@@ -72,7 +74,7 @@ def make_nginx(links):
72
74
"--with-zlib=" + os .path .join (this_dir , getLinkDir (links ["zlib" ])),
73
75
"--with-http_stub_status_module" ,
74
76
"--with-openssl=" + os .path .join (this_dir , getLinkDir (links ["openssl" ])),
75
- "--add-module=../../../ nginx_upstream_check_module" ,
77
+ "--add-module=../nginx_upstream_check_module-master " ,
76
78
"--with-http_ssl_module" ,
77
79
"--with-file-aio" ,
78
80
"--with-http_addition_module" ,
0 commit comments