try moving this here

This commit is contained in:
Jeff Carr 2018-01-28 19:36:22 -10:00
parent 0f913fe19b
commit 2e956046c9
1 changed files with 93 additions and 0 deletions

93
clone-witcom.sh Executable file
View File

@ -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/'