-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
56 lines (47 loc) · 1.19 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
#!/bin/bash
# Make bash trap to detect Ctrl+C
trap bashtrap INT
bashtrap() {
echo -e "\nCTRL+C Detected! executing installation..."
exit
}
# Install requirements for NiPy
function install_requirements {
# Prompt the user to continue installation...
echo -e "You are about to install NiPy! Continue? [Ctrl+C to exit] \c"
read $prompt
# Set requirements file
File="requirements.txt"
# Check requirements file
if [ -e $File ]; then
echo $(pip install -r $File)
echo ""
echo -e "[!] Run 'sudo python nipy.py install' to install script."
exit
else
echo "[x] Requirements file does not exist!"
exit
fi
}
# Main function
function main {
# Get input from user
echo "Welcome to NiPt installer"
echo "1) Install"
echo "2) NiPy (python) Github"
echo "3) Nipe (perl) Github"
echo -e "Choose the option: \c"
read operation
# Select Operation
if [ $operation == "1" ]; then
install_requirements
elif [ $operation == "2" ]; then
echo $(open "https://github.com/kourva/nipy")
elif [ $operation == "3" ]; then
echo $(open "https://github.com/htrgouvea/nipe")
else
exit
fi
}
# Run main function
main