-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgetcoreosbprojects.sh
executable file
·192 lines (152 loc) · 4.85 KB
/
getcoreosbprojects.sh
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#!/bin/bash
################################################################################
#
# This is a helper script to pull all core* OSB projects from GitHub to
# facilitate testing, etc.
#
# *projects which are known to contain valid NeuroML/PyNN & have passing OMV
# tests
#
################################################################################
pull=false
function gitss () {
tput setaf 5
git rev-parse --abbrev-ref HEAD
tput setaf 3
git status -s
tput setaf 2
git fetch --dry-run
git stash list
tput setaf 9
}
function gitpp () {
tput setaf 2
git pull -p
tput setaf 9
}
pull=true
echo "Pulling latest core projects..."
startDir=$(pwd)
prefix='[email protected]:'
if [ -z "$USE_SSH_FOR_GITHUB" ]; then
echo
echo "If you use SSH to access GitHub, set the environment variable USE_SSH_FOR_GITHUB to 1"
echo "This will clone GitHub repos using SSH. Using HTTPS instead"
echo
prefix='https://github.com/'
fi
prefixBB='https://bitbucket.org/'
standardGHProject()
{
echo
echo "----- Checking:" $2/$1
tput setaf 1
if [ ! -d $2 ]; then
parent=$2
parent=${parent%/*}
if [ ! -d $parent ]; then
mkdir $parent
echo "Making new directory: " $parent
fi
mkdir $2
echo "Making new directory: " $2
fi
tgtDir=$startDir/$2/$1
if [ ! -d $tgtDir ]; then
echo "Cloning to: "$tgtDir
if [ $# == 3 ]; then
echo "Using repo: "$prefix$3/$1.git
git clone $prefix$3/$1.git $tgtDir
else
osbOrg='OpenSourceBrain'
echo "Using repo: "$prefix$osbOrg/$1.git
git clone $prefix$osbOrg/$1.git $tgtDir
fi
fi
cd $tgtDir
if $pull; then
gitpp
else
gitss
fi
cd $startDir
}
standardBBProject()
{
echo
echo "----- Checking:" $2/$1
tput setaf 1
if [ ! -d $2 ]; then
parent=$2
parent=${parent%/*}
if [ ! -d $parent ]; then
mkdir $parent
echo "Making new directory: " $parent
fi
mkdir $2
echo "Making new directory: " $2
fi
tgtDir=$startDir/$2/$1
if [ ! -d $tgtDir ]; then
echo "Cloning to: "$tgtDir
if [ $# == 3 ]; then
echo "Using repo: "$prefixBB$3/$1
hg clone $prefixBB$3/$1 $tgtDir
else
osbOrg='OpenSourceBrain'
echo "Using repo: "$prefixBB$osbOrg/$1
hg clone $prefixBB$osbOrg/$1 $tgtDir
fi
fi
cd $tgtDir
if $pull; then
hgpp
else
hgss
fi
cd $startDir
}
standardGHProject 'BlueBrainProjectShowcase' 'coreprojects'
standardGHProject 'AllenInstituteNeuroML' 'coreprojects'
standardGHProject 'PotjansDiesmann2014' 'coreprojects'
standardGHProject 'L5bPyrCellHayEtAl2011' 'coreprojects'
standardGHProject 'SmithEtAl2013-L23DendriticSpikes' 'coreprojects'
standardGHProject 'IzhikevichModel' 'coreprojects'
standardGHProject 'Thalamocortical' 'coreprojects'
standardGHProject 'Brunel2000' 'coreprojects'
standardGHProject 'PospischilEtAl2008' 'coreprojects'
standardGHProject 'M1NetworkModel' 'coreprojects'
standardGHProject 'SadehEtAl2017-InhibitionStabilizedNetworks' 'coreprojects'
standardGHProject 'BahlEtAl2012_ReducedL5PyrCell' 'coreprojects'
standardGHProject 'WilsonCowan' 'coreprojects'
standardGHProject 'del-Molino2017' 'coreprojects'
standardGHProject 'MejiasEtAl2016' 'coreprojects'
standardGHProject 'ACnet2' 'coreprojects'
standardGHProject 'OpenCortex' 'coreprojects'
standardGHProject 'SolinasEtAl-GolgiCell' 'coreprojects'
standardGHProject 'GranuleCell' 'coreprojects'
standardGHProject 'GranCellLayer' 'coreprojects'
standardGHProject 'VervaekeEtAl-GolgiCellNetwork' 'coreprojects'
standardGHProject 'MF-GC-network-backprop-public' 'coreprojects' 'SilverLabUCL'
standardGHProject 'CA1PyramidalCell' 'coreprojects'
standardGHProject 'FergusonEtAl2014-CA1PyrCell' 'coreprojects'
standardGHProject 'FergusonEtAl2013-PVFastFiringCell' 'coreprojects'
standardGHProject 'PinskyRinzelModel' 'coreprojects'
standardGHProject 'WangBuzsaki1996' 'coreprojects'
standardGHProject 'ca1' 'coreprojects' 'mbezaire'
cd coreprojects/ca1
git checkout development
git pull
cd -
standardGHProject 'MiglioreEtAl14_OlfactoryBulb3D' 'coreprojects'
standardGHProject 'FitzHugh-Nagumo' 'coreprojects'
standardGHProject 'hodgkin_huxley_tutorial' 'coreprojects' 'openworm'
standardGHProject 'muscle_model' 'coreprojects' 'openworm'
standardGHProject 'c302' 'coreprojects' 'openworm'
standardGHProject 'PyloricNetwork' 'coreprojects'
standardGHProject 'HindmarshRose1984' 'coreprojects'
standardGHProject 'MorrisLecarModel' 'coreprojects'
standardGHProject 'ghk-nernst' 'coreprojects'
standardGHProject 'NeuroMorpho' 'coreprojects'
standardGHProject 'MouseLightShowcase' 'coreprojects'
cd $startDir