@@ -15,34 +15,25 @@ $(PIE_PHAR_DESTINATION):
1515 @echo " Installing PIE: $( PIE_PHAR_DESTINATION) "
1616# First, figure out a way to download the phar, with curl, wget, fetch, or a backup PHP script...
1717 @if test ! -z "$(CURL)" && test -x "$(CURL)"; then \
18- echo " downloading ${PIE_PHAR_URL} with ${CURL} to ${PIE_PHAR_TEMP_DL_LOCATION}"; \
1918 "$(CURL)" --no-progress-meter --silent --location "${PIE_PHAR_URL}" --output $(PIE_PHAR_TEMP_DL_LOCATION); \
2019 elif test ! -z "$(WGET)" && test -x "$(WGET)"; then \
21- echo " downloading ${PIE_PHAR_URL} with ${WGET} to ${PIE_PHAR_TEMP_DL_LOCATION}"; \
2220 "$(WGET)" "${PIE_PHAR_URL}" --quiet --no-directories --output-document=$(PIE_PHAR_TEMP_DL_LOCATION); \
2321 elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \
24- echo " downloading ${PIE_PHAR_URL} with ${FETCH} to ${PIE_PHAR_TEMP_DL_LOCATION}"; \
2522 "$(FETCH)" -o $(PIE_PHAR_TEMP_DL_LOCATION) "${PIE_PHAR_URL}"; \
2623 else \
27- echo " downloading ${PIE_PHAR_URL} with ${FETCH_PHP} to ${PIE_PHAR_TEMP_DL_LOCATION}"; \
2824 $(top_builddir)/sapi/cli/php -n "${FETCH_PHP}" "${PIE_PHAR_URL}" $(PIE_PHAR_TEMP_DL_LOCATION) ; \
2925 fi
3026# Try to verify using `gh` CLI, or if not use `self-verify` (which isn't the best, since it could already have been tampered)
3127 @if test ! -z "$(GH)" && test -x "$(GH)"; then \
32- echo " verifying ${PIE_PHAR_TEMP_DL_LOCATION} with ${GH}"; \
3328 "$(GH)" attestation verify --owner=php $(PIE_PHAR_TEMP_DL_LOCATION); \
3429 else \
35- echo " verifying ${PIE_PHAR_TEMP_DL_LOCATION} with self-verify (insecure)"; \
3630 $(top_builddir)/sapi/cli/php $(PIE_PHP_FLAGS) $(PIE_PHAR_TEMP_DL_LOCATION) self-verify; \
3731 fi
3832# Once verified, move it to the real location
39- @echo " move ${PIE_PHAR_TEMP_DL_LOCATION} to ${PIE_PHAR_DESTINATION}"
4033 @mv $(PIE_PHAR_TEMP_DL_LOCATION) $(PIE_PHAR_DESTINATION)
4134 @chmod +x $(PIE_PHAR_DESTINATION)
4235
4336.PHONY : install-pie
4437install-pie : $(PIE_PHAR_DESTINATION )
45- @echo " self-updating ${PIE_PHAR_DESTINATION} "
4638 @$(top_builddir ) /sapi/cli/php $(PIE_PHP_FLAGS ) $(PIE_PHAR_DESTINATION ) self-update > /dev/null 2>&1
47- @echo " checking version ${PIE_PHAR_DESTINATION} "
4839 @$(top_builddir ) /sapi/cli/php $(PIE_PHP_FLAGS ) $(PIE_PHAR_DESTINATION ) --version
0 commit comments