From 2e956046c9abbdba7046467192abba68561ef828 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 28 Jan 2018 19:36:22 -1000 Subject: [PATCH] try moving this here --- clone-witcom.sh | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100755 clone-witcom.sh diff --git a/clone-witcom.sh b/clone-witcom.sh new file mode 100755 index 0000000..a50eff6 --- /dev/null +++ b/clone-witcom.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Check to see if the directory already exists and has a working .git directory +checkforgit() +{ + # log_action_end_msg "$1" ${2:+"$2"} + path=$1 + + if [ -d $path ]; then + echo $path already exists + return 0 + else + echo $path does not exist. need to git clone here + return -1 + fi +} + +gitclone() +{ + # log_action_end_msg "$1" ${2:+"$2"} + src=$1 + path=$2 + + if checkforgit $path ; then + return -1; + fi + + git clone $src $path + result=$? + echo git clone returned $result + return $result +} + +gitupdate() +{ + # log_action_end_msg "$1" ${2:+"$2"} + src=$1 + path=$2 + #echo path=$path + #echo src=$src + cd $path ; git update +} + +witgitclone() +{ + base=$1 + path=$2 + #echo base src=$base + #echo path=$path + + if checkforgit $path ; then + return -1; + fi + src='ssh://root@ping.wit.com/var/lib/'$base + gitclone $src $path + + if checkforgit $path ; then + return -1; + fi + src='git://ping.wit.com/'$base + gitclone $src $path + + if checkforgit $path ; then + return -1; + fi + src='http://ping.wit.com/'$base + gitclone $src $path + + # log_action_end_msg "$1" ${2:+"$2"} + exit 0 +} + +# gitclone 'git://ping.wit.com/git/cloud/witcoredns' 'cloud/witcoredns' +gitclone 'git@github.com:witstartup/resumes.git' 'corp/resumes' +gitclone 'git@github.com:witstartup/org-docs.git' 'corp/org-docs' + +witgitclone 'git/cloud/witcoredns' 'cloud/witcoredns' + +gitclone 'git@github.com:witstartup/AndroidApp.git' 'phone/AndroidApp' +gitclone 'git@github.com:witstartup/webrtc-example.git' 'phone/webrtc-example' +gitclone 'git@github.com:witstartup/group-chat.git' 'phone/group-chat' + +gitclone 'git@github.com:witstartup/VirtexEval.git' 'crypto/VirtexEval' +witgitclone 'git/crypto/realtime-crypto-data' 'crypto/realtime-crypto-data' +witgitclone 'git/crypto/mining-binaries' 'crypto/mining-binaries' +gitclone 'https://github.com/ethereum-mining/ethminer.git' 'crypto/mining-code/ethminer' +gitclone 'https://github.com/ethereum/cpp-ethereum' 'crypto/mining-code/cpp-ethereum' +gitclone 'https://github.com/vthoang/cgminer.git' 'crypto/mining-code/cgminer-vthoang' +gitclone 'https://github.com/ckolivas/cgminer.git' 'crypto/mining-code/cgminer-ckolivas' + + +exit +gitclone '' 'witcom/'