From b8db8b0fa41df44488b2b82c8432b148245b664c Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 27 Oct 2014 11:32:34 +0800 Subject: [PATCH 1/5] add oschina mirror --- trunk/scripts/csdn.mirror.sh | 13 +---- trunk/scripts/oschina.mirror.sh | 96 +++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 12 deletions(-) create mode 100755 trunk/scripts/oschina.mirror.sh diff --git a/trunk/scripts/csdn.mirror.sh b/trunk/scripts/csdn.mirror.sh index e6e26a461..39f47826c 100755 --- a/trunk/scripts/csdn.mirror.sh +++ b/trunk/scripts/csdn.mirror.sh @@ -2,17 +2,6 @@ echo "更新CSDN镜像的脚本" -# 创建CSDN镜像的过程如下: -# 1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。 -# 2. 在本地虚拟机上: -# git clone git@code.csdn.net:winlinvip/srs-csdn.git -# 3. 创建同步的branch: -# git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git -# git fetch upstream -# git checkout upstream/master -b srs.master -# 4. 执行本同步更新脚本,更新。 -# bash scripts/csdn.mirror.sh - echo "argv[0]=$0" if [[ ! -f $0 ]]; then echo "directly execute the scripts on shell."; @@ -39,7 +28,7 @@ ret=$?; if [[ 0 -ne $ret ]]; then 1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。 2. 在本地虚拟机上: git clone git@code.csdn.net:winlinvip/srs-csdn.git - git checkout master && git branch 1.0release && git push origin 1.0release + cd srs-csdn && git checkout master && git branch 1.0release && git push origin 1.0release 3. 创建同步的branch: git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git git fetch upstream diff --git a/trunk/scripts/oschina.mirror.sh b/trunk/scripts/oschina.mirror.sh new file mode 100755 index 000000000..a17ff587b --- /dev/null +++ b/trunk/scripts/oschina.mirror.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +echo "更新OSChina镜像的脚本" + +echo "argv[0]=$0" +if [[ ! -f $0 ]]; then + echo "directly execute the scripts on shell."; + work_dir=`pwd` +else + echo "execute scripts in file: $0"; + work_dir=`dirname $0`; work_dir=`(cd ${work_dir} && pwd)` +fi +work_dir=`(cd ${work_dir}/.. && pwd)` +product_dir=$work_dir + +# allow start script from any dir +cd $work_dir + +. ${product_dir}/scripts/_log.sh +ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi +ok_msg "导入脚本成功" + +git remote -v|grep git.oschina.net >/dev/null 2>&1 +ret=$?; if [[ 0 -ne $ret ]]; then + failed_msg "当前分支不是OSChina镜像"; + cat < Date: Mon, 27 Oct 2014 11:34:05 +0800 Subject: [PATCH 2/5] update readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 8abbcf82b..ea83c27a7 100755 --- a/README.md +++ b/README.md @@ -151,6 +151,13 @@ CSDN: [https://code.csdn.net/winlinvip/srs-csdn](https://code.csdn.net/winlinvip git clone https://code.csdn.net/winlinvip/srs-csdn.git ``` +OSChina: [http://git.oschina.net/winlinvip/srs.oschina](http://git.oschina.net/winlinvip/srs.oschina) +[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) + +```bash +git clone https://git.oschina.net/winlinvip/srs.oschina.git +``` + ## System Requirements Supported operating systems and hardware: * All Linux , both 32 and 64 bits From e104a187635d7ccf3a1c8a84267799d52ba6cad2 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 27 Oct 2014 11:40:59 +0800 Subject: [PATCH 3/5] update sync script on master --- trunk/scripts/csdn.mirror.sh | 1 + trunk/scripts/oschina.mirror.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/trunk/scripts/csdn.mirror.sh b/trunk/scripts/csdn.mirror.sh index 39f47826c..72343e8fd 100755 --- a/trunk/scripts/csdn.mirror.sh +++ b/trunk/scripts/csdn.mirror.sh @@ -91,6 +91,7 @@ for ((;;)); do break done +git checkout master ok_msg "CSDN同步git成功" exit 0 diff --git a/trunk/scripts/oschina.mirror.sh b/trunk/scripts/oschina.mirror.sh index a17ff587b..85558b4c0 100755 --- a/trunk/scripts/oschina.mirror.sh +++ b/trunk/scripts/oschina.mirror.sh @@ -91,6 +91,7 @@ for ((;;)); do break done +git checkout master ok_msg "OSChina同步git成功" exit 0 From 60ab365660434ed00f194b3749f5eb4a3cd170d0 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 27 Oct 2014 12:03:56 +0800 Subject: [PATCH 4/5] update mirror, use utils functions. --- trunk/scripts/_mirror.utils.sh | 94 +++++++++++++++++++++++++++++++++ trunk/scripts/csdn.mirror.sh | 76 +++----------------------- trunk/scripts/oschina.mirror.sh | 76 +++----------------------- 3 files changed, 110 insertions(+), 136 deletions(-) create mode 100755 trunk/scripts/_mirror.utils.sh diff --git a/trunk/scripts/_mirror.utils.sh b/trunk/scripts/_mirror.utils.sh new file mode 100755 index 000000000..a5cee9756 --- /dev/null +++ b/trunk/scripts/_mirror.utils.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +############################################# +# help for the first checkout. +############################################# +function first_checkout() +{ + mirror_name=$1 + git_url=$2 + project_dir=$3 + sync_script=$4 + + failed_msg "当前分支不是${mirror_name}镜像"; + + cat </dev/null 2>&1 ret=$?; if [[ 0 -ne $ret ]]; then - failed_msg "当前分支不是CSDN镜像"; - cat </dev/null 2>&1 ret=$?; if [[ 0 -ne $ret ]]; then - failed_msg "当前分支不是OSChina镜像"; - cat < Date: Mon, 27 Oct 2014 12:18:50 +0800 Subject: [PATCH 5/5] update readme --- README.md | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ea83c27a7..8cd78731d 100755 --- a/README.md +++ b/README.md @@ -84,6 +84,29 @@ A big THANK YOU goes to: * [FFMPEG](http://ffmpeg.org/) and [libx264](http://www.videolan.org/) group for SRS to use to transcode. * Guido van Rossum for creating Python for api-server for SRS. +## Mirrors + +Github: [https://github.com/winlinvip/simple-rtmp-server](https://github.com/winlinvip/simple-rtmp-server) +[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) + +```bash +git clone https://github.com/winlinvip/simple-rtmp-server.git +``` + +CSDN: [https://code.csdn.net/winlinvip/srs-csdn](https://code.csdn.net/winlinvip/srs-csdn) +[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) + +```bash +git clone https://code.csdn.net/winlinvip/srs-csdn.git +``` + +OSChina: [http://git.oschina.net/winlinvip/srs.oschina](http://git.oschina.net/winlinvip/srs.oschina) +[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) + +```bash +git clone https://git.oschina.net/winlinvip/srs.oschina.git +``` + ## Usage Step 1: get SRS @@ -133,30 +156,8 @@ Donation:
[http://www.ossrs.net/srs.release/donation/index.html](http://www.ossrs.net/srs.release/donation/index.html) Donations:
-[https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt](https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt) - -## Mirrors - -Github: [https://github.com/winlinvip/simple-rtmp-server](https://github.com/winlinvip/simple-rtmp-server) -[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) - -```bash -git clone https://github.com/winlinvip/simple-rtmp-server.git -``` - -CSDN: [https://code.csdn.net/winlinvip/srs-csdn](https://code.csdn.net/winlinvip/srs-csdn) -[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) - -```bash -git clone https://code.csdn.net/winlinvip/srs-csdn.git -``` - -OSChina: [http://git.oschina.net/winlinvip/srs.oschina](http://git.oschina.net/winlinvip/srs.oschina) -[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git) - -```bash -git clone https://git.oschina.net/winlinvip/srs.oschina.git -``` +[https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt] +(https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt) ## System Requirements Supported operating systems and hardware: