正在显示
2 个修改的文件
包含
6 行增加
和
80 行删除
| @@ -22,6 +22,12 @@ git clone https://github.com/winlinvip/simple-rtmp-server.git | @@ -22,6 +22,12 @@ git clone https://github.com/winlinvip/simple-rtmp-server.git | ||
| 22 | git clone https://code.csdn.net/winlinvip/srs-csdn.git | 22 | git clone https://code.csdn.net/winlinvip/srs-csdn.git |
| 23 | ``` | 23 | ``` |
| 24 | 24 | ||
| 25 | +获得源码(国内OSChina镜像): [http://git.oschina.net/winlinvip/srs.oschina](http://git.oschina.net/winlinvip/srs.oschina) [GIT使用方法](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) | ||
| 26 | + | ||
| 27 | +```bash | ||
| 28 | +git clone https://git.oschina.net/winlinvip/srs.oschina.git | ||
| 29 | +``` | ||
| 30 | + | ||
| 25 | 报告问题(BugReport): [https://github.com/winlinvip/simple-rtmp-server/issues/new](https://github.com/winlinvip/simple-rtmp-server/issues/new)<br/> | 31 | 报告问题(BugReport): [https://github.com/winlinvip/simple-rtmp-server/issues/new](https://github.com/winlinvip/simple-rtmp-server/issues/new)<br/> |
| 26 | 中文资料(Wiki): [https://github.com/winlinvip/simple-rtmp-server/wiki](https://github.com/winlinvip/simple-rtmp-server/wiki) <br/> | 32 | 中文资料(Wiki): [https://github.com/winlinvip/simple-rtmp-server/wiki](https://github.com/winlinvip/simple-rtmp-server/wiki) <br/> |
| 27 | 使用步骤(Usage): [https://github.com/winlinvip/simple-rtmp-server#usage](#usage) <br/> | 33 | 使用步骤(Usage): [https://github.com/winlinvip/simple-rtmp-server#usage](#usage) <br/> |
trunk/scripts/csdn.mirror.sh
已删除
100755 → 0
| 1 | -#!/bin/bash | ||
| 2 | - | ||
| 3 | -echo "更新CSDN镜像的脚本" | ||
| 4 | - | ||
| 5 | -# 创建CSDN镜像的过程如下: | ||
| 6 | -# 1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。 | ||
| 7 | -# 2. 在本地虚拟机上: | ||
| 8 | -# git clone git@code.csdn.net:winlinvip/srs-csdn.git | ||
| 9 | -# 3. 创建同步的branch: | ||
| 10 | -# git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git | ||
| 11 | -# git fetch upstream | ||
| 12 | -# git checkout upstream/master -b srs.master | ||
| 13 | -# 4. 执行本同步更新脚本,更新。 | ||
| 14 | -# bash scripts/csdn.mirror.sh | ||
| 15 | - | ||
| 16 | -echo "argv[0]=$0" | ||
| 17 | -if [[ ! -f $0 ]]; then | ||
| 18 | - echo "directly execute the scripts on shell."; | ||
| 19 | - work_dir=`pwd` | ||
| 20 | -else | ||
| 21 | - echo "execute scripts in file: $0"; | ||
| 22 | - work_dir=`dirname $0`; work_dir=`(cd ${work_dir} && pwd)` | ||
| 23 | -fi | ||
| 24 | -work_dir=`(cd ${work_dir}/.. && pwd)` | ||
| 25 | -product_dir=$work_dir | ||
| 26 | - | ||
| 27 | -# allow start script from any dir | ||
| 28 | -cd $work_dir | ||
| 29 | - | ||
| 30 | -. ${product_dir}/scripts/_log.sh | ||
| 31 | -ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi | ||
| 32 | -ok_msg "导入脚本成功" | ||
| 33 | - | ||
| 34 | -git remote -v|grep code.csdn.net >/dev/null 2>&1 | ||
| 35 | -ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 36 | - failed_msg "当前分支不是CSDN镜像"; | ||
| 37 | - cat <<END | ||
| 38 | -创建CSDN镜像的过程如下: | ||
| 39 | -1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。 | ||
| 40 | -2. 在本地虚拟机上: | ||
| 41 | - git clone git@code.csdn.net:winlinvip/srs-csdn.git | ||
| 42 | -3. 创建同步的branch: | ||
| 43 | - git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git | ||
| 44 | - git fetch upstream | ||
| 45 | - git checkout upstream/master -b srs.master | ||
| 46 | -4. 执行本同步更新脚本,更新。 | ||
| 47 | - bash scripts/csdn.mirror.sh | ||
| 48 | -END | ||
| 49 | - exit 0; | ||
| 50 | -fi | ||
| 51 | - | ||
| 52 | -for ((;;)); do | ||
| 53 | - git checkout srs.master && git pull | ||
| 54 | - ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 55 | - failed_msg "更新github分支失败,自动重试"; | ||
| 56 | - continue | ||
| 57 | - else | ||
| 58 | - ok_msg "更新github分支成功" | ||
| 59 | - fi | ||
| 60 | - break | ||
| 61 | -done | ||
| 62 | - | ||
| 63 | -git checkout master && git merge srs.master | ||
| 64 | -ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "合并github分支失败, ret=$ret"; exit $ret; fi | ||
| 65 | -ok_msg "合并github分支成功" | ||
| 66 | - | ||
| 67 | -for ((;;)); do | ||
| 68 | - git push | ||
| 69 | - ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 70 | - failed_msg "提交CSDN分支失败,自动重试"; | ||
| 71 | - continue | ||
| 72 | - else | ||
| 73 | - ok_msg "提交CSDN分支成功" | ||
| 74 | - fi | ||
| 75 | - break | ||
| 76 | -done | ||
| 77 | - | ||
| 78 | -ok_msg "CSDN同步git成功" | ||
| 79 | - | ||
| 80 | -exit 0 |
-
请 注册 或 登录 后发表评论