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.
pull/125/head
Michele Locati 2020-02-27 23:13:16 +01:00
parent 7306861194
commit 7ffbb142a4
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 8 additions and 2 deletions

View File

@ -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