您现在的位置是:网站首页> 编程资料编程资料
linux安装php扩展脚本分享_linux shell_
2023-05-26
297人已围观
简介 linux安装php扩展脚本分享_linux shell_
测试环境: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
相关内容
- win下调用putty执行命令脚本分享_linux shell_
- shell实现自动备份mysql、整站数据的两个脚本分享_linux shell_
- bash脚本中if语句的使用方法_linux shell_
- shell脚本监控mysql主从状态_linux shell_
- shell脚本实现的网站日志分析统计(可以统计9种数据)_linux shell_
- shell脚本结合iptables防端口扫描的实现_linux shell_
- 监控php-fpm并自动重启服务的shell脚本_linux shell_
- shell数组操作简明总结_linux shell_
- 使用shell脚本分析网站日志统计PV、404、500等数据_linux shell_
- 使用shell脚本采集系统cpu、内存、磁盘、网络等信息_linux shell_
