-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_installation.sh
executable file
·65 lines (59 loc) · 2.46 KB
/
check_installation.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
59
60
61
62
63
64
65
#!/bin/bash
# Check if fastp is installed
conda list -n fastp_env || conda list -n fastp
# Check if bbmap is in the correct location
FILE=./bbmap/bbmap.sh
if test -f "$FILE"; then
echo "$FILE exists."
else
read -p "$FILE does not exist! Want to download bbmap?.(Yy/Nn)" yn
case $yn in
[Yy]* ) {
wget 'https://sourceforge.net/projects/bbmap/files/latest/download/BBMap_38.96.tar.gz';tar -xf 'BBMap_38.96.tar.gz' ;rm 'BBMap_38.96.tar.gz';
} || {
echo "installing bbmap failed, please download it manually and store it in this repository."
};;
[Nn]* ) echo "BBmap was not installed. Please install manually.";;
* ) echo "Please answer yes or no.";;
esac
fi
{ # try
dirname $(greadlink -f $0) &&
echo "greadlink works"
} || {
read -p "greadlink does not work! Do you want to install it.(Yy/Nn)" yn
case $yn in
[Yy]* ) {
brew install 'coreutils' && echo "greadlink should work now";
} || {
read -p "brew is not installed! Do you want to install it? (Yy/Nn)" yn
case $yn in
[Yy]* ) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)";brew install 'coreutils' && echo "greadlink should work now";;
[Nn]* ) echo "Not installing brew. Please make sure that greadlink works manually."; break;;
* ) echo "Please answer yes or no";;
esac
};;
[Nn]* ) echo "Please make sure that greadlink works. Can be done by using `brew coreutils`";;
* ) echo "Please answer yes or no.";;
esac
}
{ # try
parallel
echo "GNU parallel works"
} || {
read -p "GNU parallel does not work! Do you want to install it.(Yy/Nn)" yn
case $yn in
[Yy]* ) {
brew install parallel && echo "greadlink should work now";
} || {
read -p "brew is not installed! Do you want to install it? (Yy/Nn)" yn
case $yn in
[Yy]* ) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)";brew install 'coreutils' && echo "greadlink should work now";;
[Nn]* ) echo "Not installing brew. Please make sure that greadlink works manually."; break;;
* ) echo "Please answer yes or no";;
esac
};;
[Nn]* ) echo "Please make sure that GNU parallel works.";;
* ) echo "Please answer yes or no.";;
esac
}