当前位置: 首页 > news >正文

东莞 营销网站制作关键词检测

东莞 营销网站制作,关键词检测,美文分享网站源码,怎么做网站最便宜前提条件:搭建好gitolite 以转移正点原子rk3568_linux工程为例子,将其转移到自己的git服务器。 获取完整repo仓库 将正点原子epo仓库sync出来 evanevan-X99:~/SRC/atk$ .repo/repo/repo sync -l -j10 evanevan-X99:~/SRC/atk$ .repo/repo/repo list -n…

前提条件:搭建好gitolite
以转移正点原子rk3568_linux工程为例子,将其转移到自己的git服务器。

获取完整repo仓库

将正点原子epo仓库sync出来

evan@evan-X99:~/SRC/atk$ .repo/repo/repo sync -l -j10
evan@evan-X99:~/SRC/atk$ .repo/repo/repo list -n > ·/project.txt
evan@evan-X99:~/SRC/atk$ cat project.txt
android/rk/platform/system/rk_tee_user
android/rk/u-boot
linux/alientek/qt_demo
linux/app-new/LibIPCProtocol
linux/app-new/qfm
linux/app/QLauncher
linux/app/aiserver
linux/app/dbserver
linux/app/eptz_demo
linux/app/libgdbus
linux/app/librkdb
linux/app/multivideoplayer
linux/app/qcamera
linux/app/qplayer
linux/app/rkaiq_tool_server......

创建仓库

gitolite创建@atk-at3568_linux_repo组,project路径和正点原子的repo一样:

evan@evan-X99:~/tools/gitolite-admin$ git diff
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
index 47bb499..9bb5dad 100644
--- a/conf/gitolite.conf
+++ b/conf/gitolite.conf
@@ -3,3 +3,74 @@ repo gitolite-adminrepo testingRW+     =   @all
+
+@atk-at3568_linux_repo = atk-rk3568_linux/android/rk/platform/system/rk_tee_user
+@atk-at3568_linux_repo = atk-rk3568_linux/android/rk/u-boot
+@atk-at3568_linux_repo = atk-rk3568_linux/linux/alientek/qt_demo
+@atk-at3568_linux_repo = atk-rk3568_linux/linux/app-new/LibIPCProtocol
...
...
+@atk-at3568_linux_repo = atk-rk3568_linux/rk/rkbin
+@atk-at3568_linux_repo = atk-rk3568_linux/rk/rknn-toolkit2
+@atk-at3568_linux_repo = atk-rk3568_linux/rk/rknpu2
+
+repo @atk-at3568_linux_repo
+  RW+CD = evan

对应 repo list -n创建自己本地的git服务器

evan@evan-X99:~/tools/gitolite-admin$ git commit -m "add @atk-at3568_linux_repo"
[master 5abf05a] add @atk-at3568_linux_repo1 file changed, 71 insertions(+)
evan@evan-X99:~/tools/gitolite-admin$ git push origin master
枚举对象中: 7, 完成.
对象计数中: 100% (7/7), 完成.
使用 48 个线程进行压缩
压缩对象中: 100% (3/3), 完成.
写入对象中: 100% (4/4), 1.03 KiB | 1.03 MiB/s, 完成.
总共 4(差异 0),复用 0(差异 0),包复用 0
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/android/rk/platform/system/rk_tee_user.git/
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/android/rk/u-boot.git/
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/linux/alientek/qt_demo.git/
...
...
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/rk/rkbin.git/
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/rk/rknn-toolkit2.git/
remote: 已初始化空的 Git 仓库于 /home/git/repositories/atk-rk3568_linux/rk/rknpu2.git/
To 127.0.0.1:gitolite-admin04b1df0..5abf05a  master -> master

转移.repo

atk的仓库是深度为1的浅仓库, 无法使用git push --all直接推送。
需要逐个将仓库原来的.git删除, 从新创建提交和推送。

获取路径和项目

evan@evan-X99:~/SRC/atk$ .repo/repo/repo forall -c 'echo $REPO_PATH' > path.txt
evan@evan-X99:~/SRC/atk$ .repo/repo/repo forall -c 'echo $REPO_PROJECT' > project.txt

通过$REPO_PATH进入到每个目录,删除原来的.git然后从新初始化.git并将其推送到本地对应的$REPO_PROJECT的远程仓库


创建和推送脚本

你的脚本已经基本实现了所需的功能,但可以进行一些优化以提高可读性和健壮性。以下是一些改进建议:

  1. 错误处理:增加更多的错误处理,确保每一步操作都成功。
  2. 日志记录:添加日志记录,以便在出现问题时更容易调试。
  3. 使用函数:将重复的代码封装到函数中,使脚本更简洁。
  4. 避免硬编码:将一些常量提取出来,便于修改。

以下是优化后的脚本:

#!/bin/bash# 常量定义
REP_URL="git@127.0.0.1:atk-rk3568_linux"
LOG_FILE="script.log"# 日志函数
log() {echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
}# 检查文件是否存在
check_files() {if [ ! -f "$1" ] || [ ! -f "$2" ]; thenlog "错误:找不到文件 $1$2"exit 1fi
}# 初始化并推送 Git 仓库
init_and_push() {local path="$1"local project="$2"local src_dir="$3"# 进入目录cd "$src_dir/$path" || { log "无法进入目录 $src_dir/$path"; return; }# 删除 .git 目录(如果存在)if [ -d ".git" ]; thenrm -rf .gitfi# 初始化 Git 仓库git init || { log "初始化 Git 仓库失败: $path"; return; }# 添加所有文件git add . || { log "添加文件失败: $path"; return; }# 提交更改git commit -m "first commit" || { log "提交失败: $path"; return; }# 添加远程仓库git remote add origin "$REP_URL/$project" || { log "添加远程仓库失败: $path"; return; }# 推送至远程仓库git push origin master || { log "推送失败: $path"; return; }log "成功处理: $path : $project"
}# 主逻辑
main() {# 参数检查if [ $# -ne 2 ]; thenecho "用法: $0 <DIR> <SRC_DIR>"exit 1fi# 获取参数DIR="$1"SRC_DIR="$2"# 文件路径path_file="$DIR/path.txt"project_file="$DIR/project.txt"# 检查文件是否存在check_files "$path_file" "$project_file"# 打开文件并逐行读取{while IFS= read -r path_line && IFS= read -r project_line <&3; do# 处理每一行init_and_push "$path_line" "$project_line" "$SRC_DIR"echo "==================================="done < "$path_file" 3< "$project_file"} 3<&-  # 关闭文件描述符3# 检查文件行数是否一致if [ "$(wc -l < "$path_file")" -ne "$(wc -l < "$project_file")" ]; thenlog "警告:$path_file$project_file 的行数不一致。"fi
}# 调用主逻辑
main "$@"

解释:

  1. 日志函数log 函数用于记录日志信息,并将日志输出到控制台和日志文件 script.log 中。
  2. 检查文件函数check_files 函数用于检查两个文件是否存在。
  3. 初始化并推送 Git 仓库init_and_push 函数封装了初始化 Git 仓库、添加文件、提交更改、添加远程仓库和推送的操作。
  4. 主逻辑main 函数是脚本的主逻辑部分,包括参数检查、文件检查、逐行读取和处理每一对路径和项目。

使用说明:

  1. 将上述代码保存到一个文件中,比如命名为 process_paths.sh
  2. 确保 path.txtproject.txt 文件存在于指定的目录下。
  3. 给脚本执行权限:chmod +x process_paths.sh
  4. 运行脚本:./process_paths.sh /path/to/dir /path/to/src_dir

这样,脚本会逐行读取 path.txtproject.txt 文件,并同步处理每一对路径和项目。同时,日志记录功能可以帮助你更好地跟踪脚本的执行情况。


创建中心仓库

evan@evan-X99:~/tools/gitolite-admin$ git diff
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
index 6d44180..4d6ce0e 100644
--- a/conf/gitolite.conf
+++ b/conf/gitolite.conf
@@ -72,5 +72,7 @@ repo testing@atk-at3568_linux_repo = atk-rk3568_linux/rk/rknn-toolkit2@atk-at3568_linux_repo = atk-rk3568_linux/rk/rknpu2+@atk-at3568_linux_repo = atk-rk3568_linux/manifests
+repo @atk-at3568_linux_repoRW+CD = evan

将atk下的manifests推动到刚刚新建的仓库

evan@evan-X99:~$ git clone /home/evan/SRC/atk/.repo/manifests.git
正克隆到 'manifests'...
remote: 枚举对象中: 14, 完成.
remote: 对象计数中: 100% (14/14), 完成.
remote: 压缩对象中: 100% (12/12), 完成.
remote: 总共 14(差异 3),复用 0(差异 0),包复用 0
接收对象中: 100% (14/14), 4.71 KiB | 4.71 MiB/s, 完成.
处理 delta 中: 100% (3/3), 完成.
evan@evan-X99:~$ cd manifests/
evan@evan-X99:~/manifests$ rm .git/ -rf
evan@evan-X99:~/manifests$ git init
已初始化空的 Git 仓库于 /home/evan/manifests/.git/
evan@evan-X99:~/manifests$ git add .
evan@evan-X99:~/manifests$ git commit -m "first commit"
[master (根提交) 3a3d45c] first commit9 files changed, 386 insertions(+)create mode 100755 common/yocto.xmlcreate mode 100755 include/rk356x_doc.xmlcreate mode 120000 rk3568_linux_release.xmlcreate mode 100644 rk356x_linux/ATK-RK3568_Linux_SDK_Note.mdcreate mode 100644 rk356x_linux/atk-rk3568_linux_alpha_v1.0.xmlcreate mode 100644 rk356x_linux/atk-rk3568_linux_release_v1.0_20230620.xmlcreate mode 100644 rk356x_linux/atk-rk3568_linux_release_v1.1_20230901.xmlcreate mode 100644 rk356x_linux/atk-rk3568_linux_release_v1.2_20240129.xmlcreate mode 100644 rk356x_linux/rk356x_linux_release_v1.3.0_20220620.xml
evan@evan-X99:~/manifests$ git remote -v
evan@evan-X99:~/manifests$ git remote add origin git@127.0.0.1:atk-rk3568_linux/manifests
evan@evan-X99:~/manifests$ git push origin master
枚举对象中: 14, 完成.
对象计数中: 100% (14/14), 完成.
使用 48 个线程进行压缩
压缩对象中: 100% (12/12), 完成.
写入对象中: 100% (14/14), 4.64 KiB | 2.32 MiB/s, 完成.
总共 14(差异 3),复用 0(差异 0),包复用 0
To 127.0.0.1:atk-rk3568_linux/manifests* [new branch]      master -> master

拉取

  1. 安装repo命令
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
sudo mv repo /usr/bin/
echo "export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'" >> ~/.bashrc
  1. 新建git-repo仓库
evan@evan-X99:~/tools/gitolite-admin$ git diff
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
index 4d6ce0e..4d74d8b 100644
--- a/conf/gitolite.conf
+++ b/conf/gitolite.conf
@@ -4,6 +4,9 @@ repo gitolite-adminrepo testingRW+     =   @all+repo git-repo
+    RW+     =   evan
+@atk-at3568_linux_repo = atk-rk3568_linux/android/rk/platform/system/rk_tee_user@atk-at3568_linux_repo = atk-rk3568_linux/android/rk/u-boot@atk-at3568_linux_repo = atk-rk3568_linux/linux/alientek/qt_demo
  1. 克隆git-repo镜像到本地git服务器
evan@evan-X99:~/tools$ git clone --mirror https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
evan@evan-X99:~/tools$ cd git-repo.git/
evan@evan-X99:~/tools/git-repo.git$ git remote add gitolite git@127.0.0.1:git-repo
evan@evan-X99:~/tools/git-repo.git$ git push gitolite --all
evan@evan-X99:~/tools/git-repo.git$ git push gitolite --tags
  1. 修改中心仓库配置

    1. 指定同步分支为master(前文脚本自动化推送仓库, 默认推送到了master分支)
    2. 删除depth选项
  2. 执行命令

evan@evan-X99:~/work$ repo init -u git@127.0.0.1:atk-rk3568_linux/manifests.git -b master -m rk3568_linux_release.xml --repo-url=git@127.0.0.1:git-repo.git --no-repo-verify
evan@evan-X99:~/work$ repo sync -j10
evan@evan-X99:~/work$ repo start master --all

新增dl仓库

dl/包也一起增加到git服务器做备份下载

evan@evan-X99:~/work$ tar xzf ~/swap-x99/dl.tgz -C buildroot/
evan@evan-X99:~/work$ cd buildroot
evan@evan-X99:~/work/buildroot$ git add -f dl/
evan@evan-X99:~/work/buildroot$ git commit -m "add dl/"
evan@evan-X99:~/work/buildroot$ git push origin master

文章转载自:
http://weight.c7627.cn
http://aimless.c7627.cn
http://sporangiophore.c7627.cn
http://unlessened.c7627.cn
http://denali.c7627.cn
http://considerably.c7627.cn
http://foreskin.c7627.cn
http://geta.c7627.cn
http://seadog.c7627.cn
http://glycin.c7627.cn
http://viscousness.c7627.cn
http://supermultiplet.c7627.cn
http://boondocks.c7627.cn
http://razor.c7627.cn
http://tenderloin.c7627.cn
http://ovate.c7627.cn
http://tetartohedral.c7627.cn
http://clergywoman.c7627.cn
http://replenishment.c7627.cn
http://bundobust.c7627.cn
http://eden.c7627.cn
http://mutagenesis.c7627.cn
http://neighborite.c7627.cn
http://parotoid.c7627.cn
http://bure.c7627.cn
http://rockman.c7627.cn
http://leaflet.c7627.cn
http://unreconstructed.c7627.cn
http://broiler.c7627.cn
http://frilly.c7627.cn
http://calvities.c7627.cn
http://phenethicillin.c7627.cn
http://pathogeny.c7627.cn
http://polarisation.c7627.cn
http://potage.c7627.cn
http://ultraviolet.c7627.cn
http://valentinite.c7627.cn
http://principia.c7627.cn
http://postdoctoral.c7627.cn
http://turbocopter.c7627.cn
http://saprobity.c7627.cn
http://wateriness.c7627.cn
http://cosmotron.c7627.cn
http://cymar.c7627.cn
http://guan.c7627.cn
http://marcando.c7627.cn
http://hunk.c7627.cn
http://micrography.c7627.cn
http://largish.c7627.cn
http://hyperspatial.c7627.cn
http://chipped.c7627.cn
http://deregulation.c7627.cn
http://town.c7627.cn
http://girdler.c7627.cn
http://planont.c7627.cn
http://aieee.c7627.cn
http://netful.c7627.cn
http://paroxysm.c7627.cn
http://talonavicular.c7627.cn
http://barney.c7627.cn
http://disseizin.c7627.cn
http://padouk.c7627.cn
http://comitative.c7627.cn
http://noah.c7627.cn
http://cardiopulmonary.c7627.cn
http://examinator.c7627.cn
http://geobiological.c7627.cn
http://bund.c7627.cn
http://mopstick.c7627.cn
http://cheque.c7627.cn
http://unmortise.c7627.cn
http://startler.c7627.cn
http://imperfectible.c7627.cn
http://panopticon.c7627.cn
http://ascariasis.c7627.cn
http://micelle.c7627.cn
http://defray.c7627.cn
http://syneresis.c7627.cn
http://yarovize.c7627.cn
http://demerol.c7627.cn
http://cedarn.c7627.cn
http://polycarpous.c7627.cn
http://spherulate.c7627.cn
http://vinculum.c7627.cn
http://veinule.c7627.cn
http://retiform.c7627.cn
http://instilment.c7627.cn
http://heiau.c7627.cn
http://fetalization.c7627.cn
http://sensuousness.c7627.cn
http://armoric.c7627.cn
http://cosec.c7627.cn
http://quadrireme.c7627.cn
http://chloroacetone.c7627.cn
http://unbury.c7627.cn
http://chook.c7627.cn
http://fooster.c7627.cn
http://fabrication.c7627.cn
http://questionmaster.c7627.cn
http://holocrine.c7627.cn
http://www.zhongyajixie.com/news/92832.html

相关文章:

  • wordpress头像上传南宁网站seo外包
  • 企业如何注册网站素材网
  • 企业营销型网站建设开发手机百度账号登录入口
  • 网站建设项目推文营销顾问
  • 网站设计专业公司价格近日发生的重大新闻
  • 郴州网站建设哪个好互联网推广
  • 青浦营销型网站建设竞价推广外包托管
  • 做菠菜网站好赚吗营销网页
  • wordpress 系统找不到指定的文件.合肥seo排名扣费
  • 网站设计需要哪些哈尔滨seo关键词
  • 网站关于我们怎么做单页面模板怎么用手机创建网站
  • 如何做网站免费企业百度推广
  • wordpress轻博客模板网站seo优化分析
  • 关于加强政府网站建设的意见2021最近最火的关键词
  • 荣誉章标志做网站推广软文发稿
  • 小程序介绍范文淘宝优化标题都是用什么软件
  • 可以做bim实操题的网站谷歌seo课程
  • 南京 推广 网站建设网站注册信息查询
  • 江苏省公路与水路建设网站南宁seo内部优化
  • 南昌媒体网站建设口碑推荐附近电脑培训学校
  • wordpress开启多站点模式今日疫情实时数据
  • 苏州做i网站的网站快速建站
  • 简单网站html模板下载地址优化网站搜索
  • 移动网站做微信小程序自己做网站
  • 天津建设网站c2成绩查询如何进行seo
  • 做网站的公司面试营销网络建设
  • 如何自己做自己的网站企业qq一年多少费用
  • 动态网站建设试题和答案搜索引擎优化解释
  • 专业的网站建设企业网站建设制作免费
  • wordpress全站静太化可以免费发广告的网站