11#! /bin/bash
22
3+ yes_to_all=" "
4+
35check_or_install () {
46 if [ -d " $1 " ]; then
57 # Control will enter here if DIRECTORY exists.
@@ -12,7 +14,12 @@ check_or_install() {
1214 fi
1315 else
1416 while true ; do
15- read -p " Do you wish to install $2 to $( pwd) /$1 " yn
17+ yn=" y"
18+ echo " $yes_to_all "
19+ if [ " $yes_to_all " == " " ]; then
20+ read -p " Do you wish to install $2 to $( pwd) /$1 [y]? " yn
21+ yn=${yn:- y}
22+ fi
1623 case $yn in
1724 [Yy]* ) echo instaling $2 ;
1825 git clone $2
@@ -26,30 +33,33 @@ check_or_install() {
2633 fi
2734}
2835
29- install_seven (){
30- check_or_install sPyNNaker7 https://github.com/SpiNNakerManchester/sPyNNaker7.git ;
31- check_or_install sPyNNaker7NewModelTemplate https://github.com/SpiNNakerManchester/sPyNNaker7NewModelTemplate.git
32- check_or_install PyNN7Examples https://github.com/SpiNNakerManchester/PyNN7Examples.git
33- }
34-
3536install_eight (){
37+ check_or_install sPyNNaker https://github.com/SpiNNakerManchester/sPyNNaker.git
3638 check_or_install sPyNNaker8 https://github.com/SpiNNakerManchester/sPyNNaker8.git ;
3739 check_or_install sPyNNaker8NewModelTemplate https://github.com/SpiNNakerManchester/sPyNNaker8NewModelTemplate.git
3840 check_or_install PyNN8Examples https://github.com/SpiNNakerManchester/PyNN8Examples.git
3941}
4042
43+ install_gfe (){
44+ check_or_install SpiNNakerGraphFrontEnd https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git
45+ }
46+
4147case $1 in
42- * 7 ) echo " Installing for PyNN7" ;
43- break ;;
44- * 8 ) echo " Installing for PyNN8" ;
45- break ;;
48+ * 8 ) echo " Installing for PyNN8" ;;
49+ gfe) echo " Installing Graph Front End" ;;
4650 man ) echo " Installing special manchester repositories" ;;
47- all ) echo " Installing All the main repositories8" ;
48- break ;;
49- * ) echo " Please specifiy if you wish to install for PyNN7, PyNN8, or all? " ;
51+ all ) echo " Installing All the main repositories" ;;
52+ * ) echo " Please specifiy if you wish to install for PyNN8, gfe or all:" ;
5053 exit ;;
5154esac
5255
56+ if [ $# -gt 1 ]; then
57+ if [ " $2 " == " -y" ]; then
58+ echo " Installing without prompt"
59+ yes_to_all=" y"
60+ fi
61+ fi
62+
5363check_or_install spinnaker_tools https://github.com/SpiNNakerManchester/spinnaker_tools.git
5464check_or_install spinn_common https://github.com/SpiNNakerManchester/spinn_common.git
5565check_or_install SpiNNUtils https://github.com/SpiNNakerManchester/SpiNNUtils.git
@@ -59,42 +69,35 @@ check_or_install PACMAN https://github.com/SpiNNakerManchester/PACMAN.git
5969check_or_install SpiNNMan https://github.com/SpiNNakerManchester/SpiNNMan.git
6070check_or_install DataSpecification https://github.com/SpiNNakerManchester/DataSpecification.git
6171check_or_install SpiNNFrontEndCommon https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
62- check_or_install SpiNNakerGraphFrontEnd https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git
63- check_or_install sPyNNaker https://github.com/SpiNNakerManchester/sPyNNaker.git
64- check_or_install sPyNNakerExternalDevicesPlugin https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
65- check_or_install sPyNNakerExtraModelsPlugin https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
6672check_or_install sPyNNakerVisualisers https://github.com/SpiNNakerManchester/sPyNNakerVisualisers.git
6773check_or_install IntroLab https://github.com/SpiNNakerManchester/IntroLab.git
6874check_or_install spalloc https://github.com/SpiNNakerManchester/spalloc.git
6975
7076case $1 in
71- * 7 )g
72- install_seven
73- echo " Please insure your locally install PyNN is version 7"
74- break;;
7577 * 8 )
7678 install_eight
77- echo " Please insure your locally install PyNN is version 8"
78- break ;;
79+ echo " Please ensure your locally installed PyNN is version 8"
80+ ;;
81+ gfe )
82+ install_gfe
83+ ;;
7984 man )
80- install_seven
8185 install_eight
86+ install_gfe
8287 check_or_install IntegrationTester https://github.com/SpiNNakerManchester/IntegrationTester.git
8388 check_or_install sphinx7 https://github.com/SpiNNakerManchester/sphinx7.git
8489 check_or_install sphinx8 https://github.com/SpiNNakerManchester/sphinx8.git ;
8590 check_or_install SupportScripts https://github.com/SpiNNakerManchester/SupportScripts.git
8691 check_or_install spalloc_server https://github.com/SpiNNakerManchester/spalloc_server.git
8792 check_or_install SpiNNakerManchester.github.io https://github.com/SpiNNakerManchester/SpiNNakerManchester.github.io.git
8893 check_or_install lab_answers https://github.com/SpiNNakerManchester/lab_answers.git
89- echo " Warning you will need to use virtual machines or reinstall PyNN each time you switch Pynn version"
90- break ;;
94+ echo " Warning you will need to use virtual machines or reinstall PyNN each time you switch PyNN version"
95+ ;;
9196 all )
92- install_seven
9397 install_eight
94- echo " Warning you will need to use virtual machines or reinstall PyNN each time you switch Pynn version"
95- break ;;
96- * ) echo " Please specifiy if you wish to install for PyNN7, PyNN8, or All. " ;
98+ install_gfe
99+ echo " Warning you will need to use virtual machines or reinstall PyNN each time you switch PyNN version"
100+ ;;
101+ * ) echo " Please specifiy if you wish to install for PyNN8, gfe or all:" ;
97102 exit ;;
98103esac
99-
100-
0 commit comments