提交 29ad08e1 编写于 作者: A AlexChen 提交者: Leo Fang

[feature] support the special Version defination, like 'Version: %{xxx}'

上级 bc6a61c1
......@@ -3,6 +3,12 @@
specfile=`find ~/openEuler/src-openeuler -name $1.spec`
if [ $specfile != "" ]; then
cur_ver=`grep Version $specfile | awk -F: '{print $2}' | sed -e "s/[ \t]*//g"`
#deal with the special Version defination, like "Version: %{xxx}"
if [[ "$cur_ver" == %{* ]]; then
new_ver=`echo $cur_ver | sed 's/.*{\(.*\)}.*/\1/g'`
new_lable='%global '$new_ver' '
cur_ver=`grep "${new_lable}" $specfile | awk -F "${new_lable}" '{print $2}'`
fi
./check_upstream.rb $1 $cur_ver
else
echo $1, "is not found in src-openeuler\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册