Permalink
Browse files

Improve rebuild-all.sh script a little, by allowing for only new vers…

…ions to be compiled
  • Loading branch information...
derickr committed Feb 7, 2019
1 parent 2dfdac6 commit 28660ac3ad1abf893c09c363af1f991047c3e67f
Showing with 19 additions and 5 deletions.
  1. +19 −5 rebuild-all.sh
@@ -1,16 +1,30 @@
#!/bin/bash

FORCE=${1:-"YES"}

if [[ ${FORCE} == "YES" ]]; then
echo "Forcing builds for all versions"
fi

for i in /usr/local/php/*; do
version=`echo $i | sed 's@.*/@@'`
echo -n "Rebuilding for PHP ${version}: "

export PATH=/usr/local/php/${version}/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin
FILE=/usr/local/php/${version}/lib/php/extensions/*/xdebug.so

if [ ! -e $FILE ] || [[ ${FORCE} == "YES" ]]; then
export PATH=/usr/local/php/${version}/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin

./rebuild.sh >/tmp/xdebug-for-${version}.log 2>&1
LOG="/tmp/xdebug-for-${version}.log"
echo -n "Building: "
./rebuild.sh >$LOG 2>&1

if [[ $? == 0 ]]; then
echo "DONE"
if [[ $? == 0 ]]; then
echo "DONE"
else
echo "FAIL, log is at $LOG"
fi
else
echo "FAIL"
echo "SKIP"
fi
done

0 comments on commit 28660ac

Please sign in to comment.