linux安装php扩展脚本分享

(编辑:jimmy 日期: 2024/9/21 浏览:2)

测试环境:ubuntu 12.04 php 5.3.x

复制代码 代码如下:
#!/bin/bash
#Program:
# Accomplish to expand the specified function only one key
#History:
# 2013/11/15 pankai<530911044@qq.com> first release
test ! -f ./ext_skel && echo "The shell script of 'ext_skel' doesn't exist in current directory.\n" && exit 0
[ ! -d "skeleton" ] && echo "The directory of 'skeleton' doesn't exist in current directory.\n" && exit 0
#include "./ext_skel"
read -p "Please input the extension name: " ext_name
#echo -e "hello $ext_name"

#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

一句话新闻

微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。