forked from jonescompneurolab/hnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhnn.sh
executable file
·39 lines (33 loc) · 933 Bytes
/
hnn.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
#!/bin/bash
export CPU=$(uname -m)
export PATH=$PATH:/usr/lib64/openmpi/bin:/usr/local/nrn/$CPU/bin
paramf=
dataf=
usage()
{
echo "usage: hnn.sh [-paramf file] [-dataf file] [-help]"
}
while [ "$1" != "" ]; do
case $1 in
-paramf | --paramf ) shift
paramf=$1
;;
-dataf | --dataf ) shift
dataf=$1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done
if [ -f "$paramf" ] && [ -f "$dataf" ]
then python3 hnn.py hnn.cfg -paramf $paramf -dataf $dataf
elif [ -f "$paramf" ]
then python3 hnn.py hnn.cfg -paramf $paramf
elif [ -f "$dataf" ]
then python3 hnn.py hnn.cfg -dataf $dataf
else python3 hnn.py hnn.cfg
fi