Skip to content

Commit

Permalink
Fix Bad Substitution error on Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
puleeno committed Nov 27, 2021
1 parent cb67b75 commit 83b5da2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ fi

if [ -z "$NGX_PHP_LIBS" ]; then
PHP_VERSION="`$PHP_CONFIG --version`"
if [ ${PHP_VERSION:0:1} -ge "8" ]; then
PHP_MAJOR_VERSION=`echo $PHP_VERSION | sed -e "s#\.[0-9]*##g"`
if [ $PHP_MAJOR_VERSION -ge "8" ]; then
PHP_MAJOR_VERSION=""
else
PHP_MAJOR_VERSION=${PHP_VERSION:0:1}
fi
NGX_PHP_LIBS="`$PHP_CONFIG --ldflags` `$PHP_CONFIG --libs` -L$PHP_LIB -lphp$PHP_MAJOR_VERSION "
fi
Expand All @@ -91,4 +90,4 @@ else
CORE_LIBS="$CORE_LIBS $NGX_PHP_LIBS "
fi

have=NDK_SET_VAR . auto/have
have=NDK_SET_VAR . auto/have

0 comments on commit 83b5da2

Please sign in to comment.