From 7ffbb142a4e5ac358d01aeddb20a96eb48585685 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 27 Feb 2020 23:13:16 +0100 Subject: [PATCH] Switch to src only for snuffleupagus We can't assume that any other present or future package won't contain a "src" directory we shouldn't "cd" into. Also, we have to invoke "cd" just once, otherwise the next "cd -" will enter the wrong directory. --- install-php-extensions | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index 0cfeb02..3eb8ae1 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1008,8 +1008,14 @@ getPackageSource() { installModuleFromSource() { printf '### INSTALLING MODULE %s FROM SOURCE CODE ###\n' "$1" installModuleFromSource_dir="$(getPackageSource "$2")" - cd "$installModuleFromSource_dir" - [ -d "$installModuleFromSource_dir"/src ] && cd src + case "$1" in + snuffleupagus) + cd "$installModuleFromSource_dir/src" + ;; + *) + cd "$installModuleFromSource_dir" + ;; + esac phpize ./configure $3 CFLAGS="${4:-}" make -j$(nproc) install