Shell的使用
Posted 荣-
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Shell的使用相关的知识,希望对你有一定的参考价值。
function instead_include()
{
sed -i "s/\-I..\/..\/export\/voiceConvLayerHeader/\-I..\/voiceConvLayer\/include/g" $1
}
instead_include application/debug/Makefile
instead_include application/misc/Makefile
instead_include application/voice/Makefile
hg revert application/voiceConvLayer/Makefile
sed -i "s/\-I..\/..\/export\/voiceConvLayerHeader/\-Iinclude/g" application/voiceConvLayer/Makefile
sed -i "s/src\/GMIConverter.o/src\/GMIConverter.o \\\\\\n\\tlibVoiceConvLayer.o/g" application/voiceConvLayer/Makefile
rm -fr application/voiceConvLayer/include
mkdir application/voiceConvLayer/include
cp /repo/matthewx/voiceConvLayerHeader/* application/voiceConvLayer/include/
cp /repo/matthewx/src/libVoiceConvLayer.cc application/voiceConvLayer/
no=$(cat -n application/voiceConvLayer/include/OmciConverterSip.h |grep VOIP_OMCIV1=1)
no=${no:0:6}
no=$((no-2))
sed -i "$no,+5d" application/voiceConvLayer/include/OmciConverterSip.h
sed -i "s/omci_cvp_proxy_init/initVoiceConvLayer/g" omciMgr/OmciMain.cc
sed -i "s/XMLUpdate/updateVoiceConvLayerXML/g" omciMgr/OmciMain.cc
sed -i "s/OmciConvertMsgProxy.h/libVoiceConvLayer.h/g" omciMgr/OmciMain.cc
sed -i "s/\#include \"OmciConvertMsgProxy.h\"//g" omciMgr/OmciMain.cc
sed -i "s/\#include \"OmciConvertMsgComUtil.h\"//g" omciMgr/OmciMain.cc
function instead_omciitf()
{
sed -i "s/\#include \"OMCIItf.h\"/\#include \"OMCIItf.h\"\\n \#include \"libVoiceConvLayer.h\"\\n/g" $1
}
function instead_handleVoiceMessage()
{
sed -i "s/libSendRecvVoiceMsgConvLayer/handleVoiceMessage/g" $1
sed -i "s/libSendVoiceMsgToConvLayer/handleVoiceMessage/g" $1
}
function instead_OmciConvertMsgComUtil()
{
sed -i "s/OmciConvertMsgComUtil.h/libVoiceConvLayer.h/g" $1
}
function instead_OmciConverterSip()
{
sed -i "s/OmciConverterSip.h/libVoiceConvLayer.h/g" $1
}
instead_handleVoiceMessage omciMgr/OmciMain.cc
instead_handleVoiceMessage omciMgr/AuthSecurityMethod.cc
instead_handleVoiceMessage omciMgr/CallCtrlPMHistData.cc
instead_handleVoiceMessage omciMgr/IpHostConfig.cc
instead_handleVoiceMessage omciMgr/MgcConfigData.cc
instead_handleVoiceMessage omciMgr/MgcPMHistData.cc
instead_handleVoiceMessage omciMgr/NetworkDialPlan.cc
instead_handleVoiceMessage omciMgr/NtpConfigurationV2.cc
instead_handleVoiceMessage omciMgr/OltG.cc
instead_handleVoiceMessage omciMgr/PotsUniPptp.cc
instead_handleVoiceMessage omciMgr/RtpPMHistData.cc
instead_handleVoiceMessage omciMgr/RtpProfileData.cc
instead_handleVoiceMessage omciMgr/SipAgentConfigData.cc
instead_handleVoiceMessage omciMgr/SipAgentPMHistData.cc
instead_handleVoiceMessage omciMgr/SipCallInitPMHistData.cc
instead_handleVoiceMessage omciMgr/SipUserData.cc
instead_handleVoiceMessage omciMgr/TcpUdpConfig.cc
instead_handleVoiceMessage omciMgr/VendorSpecificVoipClient.cc
instead_handleVoiceMessage omciMgr/VendorSpecificVoipClient_2.cc
instead_handleVoiceMessage omciMgr/VendorSpecificVoipSupplement.cc
instead_handleVoiceMessage omciMgr/VoiceServiceProfile.cc
instead_handleVoiceMessage omciMgr/VoipAppSrvcProfile.cc
instead_handleVoiceMessage omciMgr/VoipCallStatistics.cc
instead_handleVoiceMessage omciMgr/VoipClient_1.cc
instead_handleVoiceMessage omciMgr/VoipClient_2.cc
instead_handleVoiceMessage omciMgr/VoipConfigData.cc
instead_handleVoiceMessage omciMgr/VoipFeatureAccessCode.cc
instead_handleVoiceMessage omciMgr/VoipLineStatus.cc
instead_handleVoiceMessage omciMgr/VoipMediaProfile.cc
instead_handleVoiceMessage omciMgr/VoipSupplement.cc
instead_handleVoiceMessage omciMgr/VoipVoiceCtp.cc
sed -i "s/\#include \"ApiOmciConverter.h\"//g" omciMgr/IpHostConfig.cc
instead_OmciConverterSip omciMgr/IpHostConfig.cc
instead_OmciConverterSip omciMgr/VoipClient_1.cc
instead_OmciConverterSip omciMgr/VendorSpecificVoipClient.cc
instead_OmciConverterSip omciMgr/VendorSpecificVoipClient_2.cc
instead_OmciConverterSip omciMgr/VendorSpecificVoipSupplement.cc
instead_OmciConvertMsgComUtil omciMgr/VendorSpecificVoipClient.cc
instead_OmciConvertMsgComUtil omciMgr/VendorSpecificVoipClient_2.cc
instead_OmciConvertMsgComUtil omciMgr/VendorSpecificVoipSupplement.cc
#instead_omciitf omciMgr/AuthSecurityMethod.cc
instead_omciitf omciMgr/CallCtrlPMHistData.cc
instead_omciitf omciMgr/MgcConfigData.cc
instead_omciitf omciMgr/MgcPMHistData.cc
instead_omciitf omciMgr/NtpConfigurationV2.cc
instead_omciitf omciMgr/VoiceServiceProfile.cc
instead_omciitf omciMgr/VoipAppSrvcProfile.cc
instead_omciitf omciMgr/VoipCallStatistics.cc
instead_omciitf omciMgr/VoipClient_2.cc
instead_omciitf omciMgr/VoipConfigData.cc
instead_omciitf omciMgr/VoipFeatureAccessCode.cc
instead_omciitf omciMgr/VoipMediaProfile.cc
instead_omciitf omciMgr/VoipSupplement.cc
instead_omciitf omciMgr/VoipVoiceCtp.cc
instead_omciitf omciMgr/TcpUdpConfig.cc
instead_omciitf omciMgr/RtpPMHistData.cc
instead_omciitf omciMgr/SipAgentConfigData.cc
instead_omciitf omciMgr/SipAgentPMHistData.cc
instead_omciitf omciMgr/SipCallInitPMHistData.cc
instead_omciitf omciMgr/SipUserData.cc
instead_omciitf omciMgr/RtpProfileData.cc
sed -i "s/\#include \"ApiOmciConverter.h\"//g" omciMgr/commonTypes.h
sed -i "s/\#include \"AppSendReceive.h\"/\#include \"AppSendReceive.h\"\\n\#include \"libVoiceConvLayer.h\"\\n/g" omciMgr/OltG.cc
sed -i "s/\#include \"NetworkDialPlan.h\"/\#include \"NetworkDialPlan.h\"\\n#include \"libVoiceConvLayer.h\"\\n/g" omciMgr/NetworkDialPlan.cc
sed -i "s/\#include \"VoipLineStatus.h\"/\#include \"VoipLineStatus.h\"\\n#include \"libVoiceConvLayer.h\"\\n/g" omciMgr/VoipLineStatus.cc
sed -i "s/\#include \"PotsUniPptp.h\"/\#include \"PotsUniPptp.h\"\\n#include \"libVoiceConvLayer.h\"\\n/g" omciMgr/PotsUniPptp.cc
cp /repo/matthewx/src/libVoiceConvLayer.h lib_export/
cp /repo/matthewx/src/VoiceConvLayerStub.cc sst/stub/
sed -i "s/OmciConverterSip.h/voice_convlayer_msg.h/g" sst/stub/StubSpec.cc
sed -i "s/msgToOmciMainStub.o/msgToOmciMainStub.o \\\\\\n VoiceConvLayerStub.o/g" sst/stub/Makefile
sed -i "s/} E_VOIP_MSG_TYPE;/} E_VOIP_MSG_TYPE;\\n\\ntypedef enum\\n{\\n\\tVOIP_OMCIV1=1,\\n\\tVOIP_OMCIV2=2\\n} E_VOIP_TYPE;\\n/g" export/voice_convlayer_msg.h
hg remove export/voiceConvLayerHeader/ApiOmciConverter.h export/voiceConvLayerHeader/ConvertRTPProfileData.h export/voiceConvLayerHeader/GMIConverter.h export/voiceConvLayerHeader/H248MsgDevicertp.h export/voiceConvLayerHeader/H248MsgPrimarymgc.h export/voiceConvLayerHeader/H248MsgTermination.h export/voiceConvLayerHeader/OmciConverterSip.h export/voiceConvLayerHeader/ConvertIPHostConfigData.h export/voiceConvLayerHeader/ConvertSIPAgentConfigData.h export/voiceConvLayerHeader/H248MsgActheartbeat.h export/voiceConvLayerHeader/H248MsgDeviceVoipProcessing.h export/voiceConvLayerHeader/H248MsgPsvheartbeat.h export/voiceConvLayerHeader/H248MsgTransactransport.h export/voiceConvLayerHeader/OmciConvertMsgComUtil.h export/voiceConvLayerHeader/ConvertMGCConfigData.h export/voiceConvLayerHeader/ConvertVoiceServiceProfileData.h export/voiceConvLayerHeader/H248MsgDevicelinephy.h export/voiceConvLayerHeader/H248MsgDigitmap.h export/voiceConvLayerHeader/H248MsgSecondarymgc.h export/voiceConvLayerHeader/OmciConvCfgType.h export/voiceConvLayerHeader/OmciConvertMsgProxy.h export/voiceConvLayerHeader/ConvertNetworkDialPlanTable.h export/voiceConvLayerHeader/ConvertVOIPMediaProfileData.h export/voiceConvLayerHeader/H248MsgDevicePhysical.h export/voiceConvLayerHeader/H248MsgMediagateway.h export/voiceConvLayerHeader/H248MsgTermidformat.h export/voiceConvLayerHeader/OmciConverterH248.h
以上是关于Shell的使用的主要内容,如果未能解决你的问题,请参考以下文章