手机
当前位置:查字典教程网 >脚本专栏 >linuxshell >linux安装php扩展脚本分享
linux安装php扩展脚本分享
摘要:测试环境:ubuntu12.04php5.3.x复制代码代码如下:#!/bin/bash#Program:#Accomplishtoexpa...

测试环境: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

【linux安装php扩展脚本分享】相关文章:

linux 创建守护进程的相关知识

nginx日志切割脚本分享

linux服务器安全加固shell脚本代码

vtune自动化安装脚本

shell监控脚本 准备工作分享

使用curl递归下载软件脚本分享

linux自动清理日志脚本分享

linux下实现ftp自动备份shell脚本

Linux服务器硬件运行状态及故障邮件提醒的监控脚本分享

Shell实现强制释放内存脚本分享

精品推荐
分类导航