Unbreak install after repo transfers (#1523)
The directory name in the zip we download from github's release archive will be different now that the project was renamed. It may be renamed again in the future, so try to obtain the directory name from the zip. Fixes https://github.com/apache/incubator-pagespeed-ngx/issues/1521
This commit is contained in:
committed by
GitHub
parent
ccaa714a85
commit
e733a838c3
@@ -612,7 +612,9 @@ Not deleting $directory; name is suspiciously short. Something is wrong."
|
|||||||
nps_downloaded="$TEMPDIR/$nps_downloaded_fname.zip"
|
nps_downloaded="$TEMPDIR/$nps_downloaded_fname.zip"
|
||||||
status "Downloading ngx_pagespeed..."
|
status "Downloading ngx_pagespeed..."
|
||||||
run wget "$nps_baseurl/$tag_name.zip" -O "$nps_downloaded"
|
run wget "$nps_baseurl/$tag_name.zip" -O "$nps_downloaded"
|
||||||
nps_module_dir="$BUILDDIR/$nps_downloaded_fname"
|
# Read the directory name from the zip, the first line is expected to have it.
|
||||||
|
nps_module_dir=$(unzip -qql "$nps_downloaded" | head -n1 | tr -s ' ' | cut -d' ' -f5-)
|
||||||
|
nps_module_dir="$BUILDDIR/${nps_module_dir::-1}"
|
||||||
delete_if_already_exists "$nps_module_dir"
|
delete_if_already_exists "$nps_module_dir"
|
||||||
status "Extracting ngx_pagespeed..."
|
status "Extracting ngx_pagespeed..."
|
||||||
run unzip -q "$nps_downloaded" -d "$BUILDDIR"
|
run unzip -q "$nps_downloaded" -d "$BUILDDIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user