Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

better support for custom $initarget #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ fi
if [ "x$initarget" = x ]; then
initarget="$instdir/lib/php.ini"
fi

initarget_dir=$(dirname "$initarget")
if [ ! -d "$initarget_dir" ] && ! mkdir -p -m 755 "$initarget_dir"; then
echo "Warning: failed to created directory $initarget_dir." 1>&2
fi

if [ -f "php.ini-development" ]; then
#php 5.3
cp "php.ini-development" "$initarget"
Expand Down Expand Up @@ -206,5 +212,5 @@ ln -fs "$instdir/bin/phpize" "$shbindir/phpize-$version"

if [ $vmajor -gt 5 ] || [ $vmajor -eq 5 -a $vminor -gt 2 ]; then
cd "$basedir"
./pyrus.sh "$version" "$instdir"
./pyrus.sh "$version" "$instdir" "$initarget"
fi
3 changes: 2 additions & 1 deletion src/pyrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fi

version="$1"
instdir="$2"
initarget="${3:-$instdir/lib/php.ini}"

if [ ! -d "$instdir" ]; then
echo "PHP installation directory does not exist: $instdir"
Expand Down Expand Up @@ -45,4 +46,4 @@ chmod +x "$pyrusbin"
#symlink
ln -sf "$pyrusbin" "$instdir/../bin/pyrus-$version"

echo "include_path=\".:$instdir/pear/php/\"" >> "$instdir/lib/php.ini"
echo "include_path=\".:$instdir/pear/php/\"" >> "$initarget"