展讯平台Linux下升级patch方法

来源:互联网 发布:cf出现网络出现异常 编辑:程序博客网 时间:2024/05/21 09:22

展讯提供的patch会把原始的代码放到old文件夹中,修改后的代码放到new文件夹中,我们要做的就是把new文件夹中相对与old文件夹中修改的部分合入到本地

首先安装rcs

sudo apt-get install rcs

查看merge用法:man merge

SYNOPSIS       merge [ options ] file1 file2 file3DESCRIPTION       merge  incorporates  all  changes  that  lead  from file2 to file3 into       file1.  The result ordinarily goes into file1.   merge  is  useful  for       combining separate changes to an original.  Suppose file2 is the origi‐       nal, and both file1 and file3 are modifications of file2.   Then  merge       combines both changes.

1.merge 单个文件

merge ~/project/ur_folder_path/xxx.java old/xxx.java new/xxx.java

2.merge 多个文件

cd oldfind . -type f -exec merge ~/project/TDXXX/{} {} ../new/{} \;

解析:

find . -type f 的作用是把目录下的old目录中的所有文件都列出来

之后(-exec merge ~/project/TDXXX/{} {} ../new/{} \;)我们把这些列出来的文件依次和new目录中的相应文件比较,merge到我们自己的项目中


通常展讯patch中的readme.txt在ubuntu下查看时,中文显示乱码。可以使用iconv命令对readme.txt文件进行转换(gbk转utf-8)

原创粉丝点击