1 Star 0 Fork 12

baixu/ros-porting-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
change-obs-packages-to-gitee.sh 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
lixiang 提交于 2024-09-19 08:09 . fix some errors
#!/bin/bash
. base.sh
USER_INFO="$1"
OBS_PACKAGES_LIST=${OUTPUT}/obs-packages.list
OBS_BASE=${OUTPUT}/obs
SERVICE_FILE=_service
prepare()
{
if [ ! -d "${OBS_BASE}" -o ! -f "${OBS_PACKAGES_LIST}" ]
then
log_error "please run download-obs-projects.sh first"
exit 1
fi
}
main()
{
prepare
info_log "Start to change obs packages."
cd ${OBS_BASE}/${OBS_PROJECT}
while read pkg
do
info_log "start change package $pkg"
grep -q "^${pkg}$" ${ROS_PROJECTS_NAME}
if [ $? -eq 0 ]
then
branch=${OPENEULER_SP_BRANCH}
else
branch=${OPENEULER_ROS_DEP_PKG_BRANCH}
fi
cd ${OBS_BASE}/${OBS_PROJECT}/${pkg}
echo "<services>" > ${SERVICE_FILE}
echo " <service name=\"tar_scm\">" >> ${SERVICE_FILE}
echo " <param name=\"scm\">git</param>" >> ${SERVICE_FILE}
echo " <param name=\"url\">https://${GITEE_DOMAIN}/${GITEE_ORG}/${pkg}.git</param>" >> ${SERVICE_FILE}
echo " <param name=\"exclude\">*</param>" >> ${SERVICE_FILE}
echo " <param name=\"extract\">*</param>" >> ${SERVICE_FILE}
echo " <param name=\"revision\">${branch}</param>" >> ${SERVICE_FILE}
echo " </service>" >> ${SERVICE_FILE}
echo "</services>" >> ${SERVICE_FILE}
osc ci -m "change remote to ${GITEE_DOMAIN}/${GITEE_ORG}"
[ $? -ne 0 ] && log_error "change package $pkg error"
done < ${OBS_PACKAGES_LIST}
info_log "get status of projects ok"
}
main $*
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/baixu_yewu/ros-porting-tools.git
git@gitee.com:baixu_yewu/ros-porting-tools.git
baixu_yewu
ros-porting-tools
ros-porting-tools
master

搜索帮助