linux安裝php擴展腳本分享
測試環(huán)境: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
相關(guān)文章
Linux Shell中curl和wget使用代理IP的方法教程
這篇文章主要給大家介紹了關(guān)于在Linux Shell中curl和wget使用代理IP的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面跟著小編來一起學(xué)習(xí)學(xué)習(xí)吧。2017-08-08解析spark源碼yarn-cluster模式任務(wù)提交
這篇文章主要為大家解析了spark源碼中yarn-cluster模式任務(wù)提交方式,有需要的朋友可以借鑒參考下,希望可以有所幫助,祝大家多多進步,早日升職加薪2021-09-09用expect實現(xiàn)的自動登錄到多臺服務(wù)器的shell腳本
自動登錄到多臺服務(wù)器的shell腳本,用expect來實現(xiàn)的一段代碼,需要的朋友可以參考下2013-02-02linux執(zhí)行sh腳本報錯:$’\r’: 未找到命令的完美解決方法
本文給大家介紹linux執(zhí)行sh腳本報錯:$’\r’: 未找到命令的完美解決方法,原因分析及解決辦法給大家講解的非常明白,感興趣的朋友跟隨小編一起看看吧2023-02-02Linux?Shell腳本中如何獲取命令運行的結(jié)果
腳本中常常要獲取一些命令的執(zhí)行結(jié)果,比如當(dāng)前目錄pwd、當(dāng)前時間date等等,下面這篇文章主要給大家介紹了關(guān)于Linux?Shell腳本中如何獲取命令運行的結(jié)果,需要的朋友可以參考下2023-06-06Idea使用Bashsupport插件編輯Shell腳本的方法
這篇文章主要介紹了Idea插件之——Bashsupport編輯Shell腳本的相關(guān)知識,功能非常齊全有檢查錯誤并且還可以在idea中直接運行shell腳本,本教程帶領(lǐng)大家一步步演示插件的安裝和配置,需要的朋友可以參考下2021-05-05