forked from victoriadrake/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repos.list.work
executable file
·69 lines (61 loc) · 2.71 KB
/
repos.list.work
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# list of git repos to clone
# list is defined by "<src> <dest>"
# NOTE: all SSH keys must be setup ahead of time for this script to work
# SFGITLAB.NRL.NAVY.MIL
# SCYLLA.NRL.NAVY.MIL
# SFFS00.NRL.NAVY.MIL
# GITHUB.COM
# GITLAB.COM
# BITBUCKET.COM
## Joe's ORG Stuff
org=( \
"[email protected]:joehays/dendron.git ${HOME}/dendron" \
"[email protected]:joehays/org-tech.git ${HOME}/dendron/dependencies/github.com/joehays/org-tech" \
"[email protected]:joehays/notes.git ${HOME}/dendron/dependencies/sfgitlab.nrl.navy.mil/joehays/org-work" \
"[email protected]:joehays/dotfiles.git ${HOME}/dev/dotfiles" \
"joehays@scylla:/home/joehays/Documents/joe-docs.git ${HOME}/dev/joe-docs" \
"joehays@sffs00:/gitrepo/code_8234/team/joe/proposals.git ${HOME}/dev/proposals"
)
## NRL Programs
programs=( \
"[email protected]:code_8234/SafeLifelongMotorLearning/braintorch.git ${HOME}/dev/braintorch" \
"[email protected]:USNavalResearchLaboratory/Deep_ROA.git ${HOME}/dev/deep_roa_sfgitlab" \
"[email protected]:code_8234/SafeLifelongMotorLearning/function-approximators.git ${HOME}/dev/function-approximators" \
"[email protected]:code_8234/KinovaG3/kg3-neuro-control.git ${HOME}/dev/kg3-neuro-control" \
"[email protected]:code_8234/nemo/nemo.git ${HOME}/dev/nemo" \
"[email protected]:code_8234/SafeLifelongMotorLearning/neuroplast.git ${HOME}/dev/neuroplast" \
"[email protected]:code_8234/SafeLifelongMotorLearning/sllml.git ${HOME}/dev/sllml"
#"https://www.trmc.osd.mil/bitbucket/scm/${HOME}joe.hays/neuroplast.git ${HOME}/dev/trmc-neuroplast"
)
## Third-party tools/dependencies
third_party=( \
"[email protected]:inivation/dv/dv-processing.git ${HOME}/dev/dv-processing" \
"[email protected]:VundleVim/Vundle.vim.git ${HOME}/.vim/bundle/Vundle.vim" \
"[email protected]:lava-nc/lava.git ${HOME}/dev/lava/lava" \
"[email protected]:lava-nc/lava-dl.git ${HOME}/dev/lava/lava-dl" \
"[email protected]:neuromorphic-utk/framework.git ${HOME}/dev/tennlab/framework"
)
## combine all repo lists...
repos=( \
"${org[@]}" \
"${programs[@]}" \
"${third_party[@]}"
)
## function to conditionally clone the repo (if it doesn't already exist at the destination)
function gitClone () {
list=("$@")
for repo in "${list[@]}"
do
src="$(echo ${repo} | cut -d ' ' -f 1)"
dest="$(echo ${repo} | cut -d ' ' -f 2)"
if [[ -d "${dest}" ]]; then
echo "!!!!!!! '${src}' is already cloned to '${dest}'"
else
echo ">>>>>>> now cloning ${src}"
git clone ${src} ${dest}
fi
done
}
## Main script
gitClone "${repos[@]}"