From 60ab365660434ed00f194b3749f5eb4a3cd170d0 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 27 Oct 2014 12:03:56 +0800 Subject: [PATCH] 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 <