1 Star 0 Fork 32

hantwofish/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0250-tools-fix-script-generate-patchname-wrong.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
From 878bd892608e312276945a57430c86909cefb459 Mon Sep 17 00:00:00 2001
From: yinbin6 <yinbin8@huawei.com>
Date: Fri, 30 Aug 2024 16:15:03 +0800
Subject: [PATCH] tools: fix script generate patchname wrong
---
tools/sync-gazelle-src.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/sync-gazelle-src.sh b/tools/sync-gazelle-src.sh
index 142e770..ccfa8eb 100644
--- a/tools/sync-gazelle-src.sh
+++ b/tools/sync-gazelle-src.sh
@@ -65,14 +65,14 @@ for commitid in ${COMMIT_ID};do
fi
#get patchnum from spec file.
- patchnum=$(grep -o "Patch[0-9]\+" *.spec | tail -n 1 | awk -Fh '{print $2}')
+ patchnum=$(grep -o "Patch[0-9]\+" *.spec | tail -n 1 | awk -Fh '{print $2}' | awk '{print $1 - 9000}')
if [ -z $patchnum ];then
#there is no patch in spec file. get patch by conunt patches in dir.
patchnum=$(ls ./*.patch | wc -l)
- let Patchnum=9000+$patchnum
- patchnum=$(printf "%04d\n" $patchnum)
fi
let patchnum+=1
+ let Patchnum=9000+$patchnum
+ patchnum=$(printf "%04d\n" $patchnum)
new_patchname=$(echo $patchname | sed -e "s/^0001-/${patchnum}-/g")
echo $new_patchname
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/gazelle_1.git
git@gitee.com:hantwofish/gazelle_1.git
hantwofish
gazelle_1
gazelle_1
master

搜索帮助