时间:2021-04-26 11:03:08 | 栏目:Shell | 点击:次
测试环境:ubuntu 12.04 php 5.3.x
#The blank space is necessary
#Error:
# like: if[ ! -d "$ext_name" ]; then
if [ ! -d "$ext_name" ]; then
./ext_skel --extname=$ext_name
fi
file="./$ext_name/config.m4"
copy="./$ext_name/config"
if [ ! -f "./$ext_name/configs" ]; then
# Create a new file and clear it if it exists
:> "$copy"
cat "$file" | while read line
#for line in $( cat ./zend/config.m4 )
do
string=$( echo $line | grep 'PHP_ARG_ENABLE' )
if [ "$string" != "" ]; then
echo $line | cut -c5- >> $copy
read line
echo $line | cut -c5- >> $copy
read line
echo $line | cut -c5- >> $copy
read line
fi
echo $line >> $copy
done
mv "$file" "./$ext_name/configs"
mv "$copy" "./$ext_name/config.m4"
fi
cd $ext_name
phpize
./configure