alternc.install: PHP version comparison is broken for buster (#461)

The current comparison can only work on debian stretch, that ships php
7.0, but debian buster has a more recent version and bullseye will have
an even more recent version.

This change was suggested by @ulvida (Daniel Viñar Ulriksen) on Github.
Thanks!

Closes: #459

Co-authored-by: Gabriel Filion <gabriel@koumbit.org>
This commit is contained in:
Gabriel Filion 2021-05-17 14:02:27 -04:00 committed by GitHub
parent 9fe5164405
commit 6448440101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -338,7 +338,7 @@ rm -f $SED_SCRIPT
# add php.ini directives for AlternC in any installed php version:
php="`ls /usr/lib/apache*/*/*php*.so | sed -e 's/^.*libphp\(.*\)\.so$/\1/' | tail -1`"
if [ "$php" = "7.0" ]
if ! [[ "$php" < "7" ]]
then
ln -fs /etc/alternc/alternc.ini /etc/php/$php/apache2/conf.d/alternc.ini || true
ln -fs /etc/alternc/alternc.ini /etc/php/$php/cli/conf.d/alternc.ini || true