-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·58 lines (46 loc) · 1.64 KB
/
install.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
#!/bin/bash
# Boot up
echo "Please make sure you have a working version of Python"
echo "with matplotlib and numpy plus ifort installed at"
echo "the bare minimum. Type C-c to exit, otherwise hit enter"
echo ""
read empty
# Remove files if they were previously installed
echo "Deleting files from previous installs"
./uninstall.sh
echo "Compiling numFort library, may take a bit"
echo ""
./recompile.sh
####################################################################################
mkdir PythonPlot
cwd=$(pwd)
touch PythonPlot/Pyplot.py
touch PythonPlot/CustomPlot.py
cat Templates/PyplotTemp.py >> PythonPlot/Pyplot.py
pypath=$(which python)
echo "#!$pypath" | cat - PythonPlot/Pyplot.py > temp && mv temp PythonPlot/Pyplot.py
cat Templates/CustomTemp.py >> PythonPlot/CustomPlot.py
echo "#!$pypath" | cat - PythonPlot/CustomPlot.py > temp && mv temp PythonPlot/CustomPlot.py
chmod +x PythonPlot/Pyplot.py
chmod +x PythonPlot/CustomPlot.py
echo ""
echo "NumFort wants to append somthing to your ~/.bashrc, make sure"
echo "the file exists"
read empty
if grep -Fxq "# Appended by NumFort, Path to directory" ~/.bashrc
then
empty="nothing"
else
echo >> ~/.bashrc
echo "# Appended by NumFort, Path to directory" >> ~/.bashrc
echo "export NumFortPath="$cwd/Build/ >> ~/.bashrc
echo >> ~/.bashrc
fi
source ~/.bashrc
echo ""
echo "Plotting code may be found in Pyplot directory"
echo "copy the created makefile template to your .f90 file."
echo "Type (use kinds and use numFort) in your .f90 file for base use"
echo "see readme documentation on specifics of available functions"
echo "Have fun! Let me know if they're any errors"
echo ""