#!/bin/sh
current=$(pwd)
echo -n "Please input first manifest:"
read ManifestOld
echo -n "Please input second manifest:"
read ManifestNew
export log=$(echo "${current}/diff_two_manifest.txt")
cat $current/$ManifestOld |grep "project name=" |while read line
do
eachline=$(echo $line)
projecttmp=${
eachline#*\"}
project=${
projecttmp%%\"*}
revisionoldtmp=${eachline#*revision=\"}
revisionold=${
revisionoldtmp%%\"*}
pathtmp=${eachline#*path=\"}
path=${
pathtmp%%\"*}
revisionnewline=$(cat $current/$ManifestNew |grep $project)
revisionnewtmp=${revisionnewline#*revision=\"}
revisionnew=${
revisionnewtmp%%\"*}
if [ $revisionold != $revisionnew ];then
cd $current/$path
echo ------------------------------------------------------------ |tee -a $log
echo "project "$path: |tee -a $log
git log --pretty=oneline $revisionold..$revisionnew |tee -a $log
echo ------------------------------------------------------------ |tee -a $log
cd $current
fi
done
通过两个manifest文件比较两个版本之间差异
猜你喜欢
转载自blog.csdn.net/qq_27577263/article/details/125297165
今日推荐
周排行