shell脚本一键安装php扩展模块
发布时间:2020-12-15 07:11:43 所属栏目:安全 来源:网络整理
导读:今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/bin/bash#Program:#Accomplish to expand the specified function only one key#History:#2013/11/15 pankai[email?protected]first releasetest !
以下代码由PHP站长网 52php.cn收集自互联网 现在PHP站长网小编把它分享给大家,仅供参考 #!/bin/bash #Program: # Accomplish to expand the specified function only one key #History: # 2013/11/15 pankai<[email?protected]> 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 以上内容由PHP站长网【52php.cn】收集整理供大家参考研究 如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |