码迷,mamicode.com
首页 > 系统相关 > 详细

shell

时间:2015-07-28 20:43:10      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

#!/bin/bash

 

 

 

VersionPath="Mine/SettingController.m"

 

if ["$BUILD_NUMBER"""]||["$SVN_REVISION"""]

then

echo "version is null"

else

sed  -i ‘‘ -e "s%[0-9].[0-9]\{1,10\}.[0-9]\{1,10\}%0.$BUILD_NUMBER.$SVN_REVISION%" $VersionPath

fi

 

 

ServerHeader="csfz_SERVER_URL "

ServerPath="Common/Constant.h"

Quotes=‘@"‘

Mquotes=‘"‘

if ["$SERVER_URL_PREFIX"""]

then

echo "server_url_prefix is null"

else

sed  -i ‘‘ -e "s%csfz_SERVER_URL[[:blank:]]@.*%$ServerHeader$Quotes$SERVER_URL_PREFIX$Mquotes%" $ServerPath

fi

 

 

 

shell

标签:

原文地址:http://www.cnblogs.com/guligei/p/4684157.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!