-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_cjp9.sh
executable file
·36 lines (28 loc) · 989 Bytes
/
make_cjp9.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
#!/bin/bash
dSPM="https://www.fil.ion.ucl.ac.uk/spm/download/restricted/eldorado/spm12.zip"
dCAT="http://www.neuro.uni-jena.de/cat12/cat12_r1742.zip"
pipeName=cjp_v0009-spm12_v7771-cat12_r1742
if [ ! -x $1 ] | [ $# -lt 1 ]; then
echo "please specify MATLABR2019a executable!"
exit 1
fi
matlabBin=$1
mkdir -p pipeline
cd pipeline
# remove old stuff
rm -r "standalone_"${pipeName} standalone $pipeName 2> /dev/null
# download stuff
(wget $dSPM && unzip $(basename $dSPM) && rm $(basename $dSPM)) &
(wget $dCAT && unzip $(basename $dCAT) && rm $(basename $dCAT))
wait
# setup spm
cp ../spm12/* spm12/
cp ../batch/longitudinal-v1742/cat_defaults.m cat12/
mv cat12 spm12/toolbox
mv spm12 $pipeName
cd ..
# compile it
$matlabBin -nodisplay -nodesktop -r "make_cjp('$(readlink -e pipeline/$pipeName)')"
mv pipeline/standalone "pipeline/standalone_"${pipeName}
cp batch/longitudinal-v1742/*.mat batch/longitudinal-v1742/*.txt "pipeline/standalone_"${pipeName}
echo "Done. Have fun!"