-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_bundle.sh
executable file
·50 lines (39 loc) · 1.62 KB
/
create_bundle.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
#!/bin/bash
# Automate creation of neuroConstruct/CElegansNeuroML bundle.
#
# Run this script from the OpenwormConnectomeBundle directory.
# It will download the components of the bundle, and create a
# zip file of the bundle in the OpenwormConnectomeBundle dir.
DATE=`date +%Y%m%d`
# Create bundle directory
BUNDLE_DIR_NAME=CElegansNeuroConstructBundle-snapshot-$DATE
mkdir $BUNDLE_DIR_NAME
cd $BUNDLE_DIR_NAME
# Get neuroConstruct
# Use jogamp_j3d branch for now, as this includes updated 3D
# visualization libs that work properly on OS X.
git clone -b jogamp_j3d git://github.com/NeuralEnsemble/neuroConstruct.git
#git clone git://github.com/NeuralEnsemble/neuroConstruct.git
cd neuroConstruct
./updatenC.sh
# Modify neuroConstruct install scripts
sed -i "s/export NC_HOME=\$HOME\/neuroConstruct/export NC_HOME=\$(dirname \$0)/" nC.sh
sed -i "s/set NC_HOME=C:\\\\neuroConstruct/set NC_HOME=%~dp0/" nC.bat
# Copy README and scripts to bundle directory
cd ..
cp ../setup.sh ../setup.bat ../README.txt .
chmod 754 setup.sh
# Set dates in README
sed -i "s/{{DATE}}/$DATE/" README.txt
# Get CElegansNeuroML
git clone git://github.com/openworm/CElegansNeuroML.git
# Create zip file of bundle directory
cd ..
zip -r $BUNDLE_DIR_NAME $BUNDLE_DIR_NAME
# Clean up
rm -rf $BUNDLE_DIR_NAME
echo -e "\nBundle created.\n"
echo "Now upload to Dropbox and update the download links at:"
echo "* Openworm Docs: http://docs.openworm.org/en/latest/Resources/running-nc.html#running-nc"
echo "* Downloads page: http://www.openworm.org/downloads.html"
echo "* Openworm Wiki: https://github.com/openworm/OpenWorm/wiki/Running-the-C.-elegans-model-in-neuroConstruct"