代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-sig/ck-build 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
DIST="anX"
KVER="5.16.10"
BASE=$1
RELEASE_TAG=$2
AUTHOR_MAIL="Shile Zhang <shile.zhang@linux.alibaba.com>"
CHANGELOG="$(pwd)/changelog"
CK_DIR="../ck/"
BRANCH="linux-next"
function update_spec() {
### update kernel release
KREL=${RELEASE_TAG##*-}
sed -i "s/!KREL:.*}/!KREL:${KREL}}/g" kernel.spec
### update changelog
echo "* $(date +"%a %b %d %Y") ${AUTHOR_MAIL} [${RELEASE_TAG}.${DIST}]" > ${CHANGELOG}
pushd ${CK_DIR} >/dev/null 2>&1
git checkout ${BRANCH} || { echo "Failed to switch target branch"; exit; }
git log --pretty=format:"- %s (%an)" "${BASE}..${RELEASE_TAG}" >> ${CHANGELOG}
popd >/dev/null 2>&1
echo "" >> ${CHANGELOG}
echo "" >> ${CHANGELOG}
sed -i "/%changelog/r ${CHANGELOG}" kernel.spec
rm -rf ${CHANGELOG}
echo
echo "kernel.spec has been update"
##echo "---"
##git diff kernel.spec
##echo "---"
}
function archive_kernel() {
pushd ${CK_DIR} >/dev/null 2>&1
git archive --format=tar --prefix="linux-${RELEASE_TAG}.${DIST}/" HEAD |xz -T$(nproc) > linux-${RELEASE_TAG}.${DIST}.tar.xz
mv linux-${RELEASE_TAG}.${DIST}.tar.xz ../anck-build/
popd >/dev/null 2>&1
}
if [ $# -lt 2 ]; then
echo "Invalid args!"
echo "Usage: $(basename -- $0) 25_rc2 25"
exit
fi
echo "Update the kernel.spec..."
update_spec
echo "Create the kernel source tar ball..."
archive_kernel
echo "Done."
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。