Skip to content

Commit

Permalink
Fix installation of PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonAndre committed Oct 17, 2018
1 parent d6925f3 commit e4e182a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions ci/install_php_nts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

echo "Attempting to install NTS PHP, NTS version '$PHP_NTS_VERSION'/ configure args '$PHP_CONFIGURE_ARGS'"
if [[ "x$PHP_NTS_VERSION" = "x" ]]; then
echo "Missing PHP_NTS_VERSION"
exit 1
echo "Missing PHP_NTS_VERSION"
exit 1
elif [[ "x$PHP_CONFIGURE_ARGS" = "x" ]] ; then
echo "Missing PHP_CONFIGURE_ARGS"
exit 1
echo "Missing PHP_CONFIGURE_ARGS"
exit 1
fi
PHP_INSTALL_DIR="$(./ci/generate_php_install_dir.sh)"
echo "Downloading $PHP_INSTALL_DIR\n"
if [[ -x $PHP_INSTALL_DIR/bin/php ]] ; then
echo "PHP $PHP_NTS_VERSION already installed and in cache at $PHP_INSTALL_DIR";
exit 0
echo "PHP $PHP_NTS_VERSION already installed and in cache at $PHP_INSTALL_DIR";
exit 0
fi
PHP_NTS_NORMAL_VERSION=${PHP_NTS_VERSION//RC[0-9]/}
PHP_NTS_NORMAL_VERSION=${PHP_NTS_NORMAL_VERSION//alpha[0-9]/}
Expand All @@ -21,25 +21,25 @@ PHP_FOLDER="php-$PHP_NTS_VERSION"

# Remove cache if it somehow exists
if [[ "x${TRAVIS:-0}" != "x" ]]; then
rm -rf $HOME/travis_cache/
rm -rf $HOME/travis_cache/
fi
# Otherwise, put a minimal installation inside of the cache.
PHP_TAR_FILE="$PHP_FOLDER.tar.bz2"
if [[ "$PHP_NTS_NORMAL_VERSION" == "7.3.0" || "$PHP_NTS_NORMAL_VERSION" == "7.4.0" ]] ; then
if [[ "$PHP_NTS_NORMAL_VERSION" == "7.3.0" ]] ; then
GIT_BRANCH=7.3
GIT_BRANCH=PHP-7.3
else
GIT_BRANCH=master
fi
curl --location --verbose https://github.com/php/php-src/archive/PHP-$GIT_BRANCH.zip -o php-src-PHP-$GIT_BRANCH.zip
unzip php-src-PHP-$GIT_BRANCH.zip
curl --location --verbose https://github.com/php/php-src/archive/$GIT_BRANCH.zip -o php-src-$GIT_BRANCH.zip
unzip -q php-src-$GIT_BRANCH.zip
PHP_FOLDER=php-src-$GIT_BRANCH
pushd $PHP_FOLDER
./buildconf --force
popd
./buildconf --force
popd
else
curl --verbose https://secure.php.net/distributions/$PHP_TAR_FILE -o $PHP_TAR_FILE
tar xjf $PHP_TAR_FILE
curl --verbose https://secure.php.net/distributions/$PHP_TAR_FILE -o $PHP_TAR_FILE
tar xjf $PHP_TAR_FILE
fi

pushd $PHP_FOLDER
Expand Down

0 comments on commit e4e182a

Please sign in to comment.