forked from Klortho/edirect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·33 lines (28 loc) · 830 Bytes
/
setup.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
#!/bin/bash -norc
DIR="$( cd "$( dirname "$0" )" && pwd )"
cat <<EOF
Trying to establish local installations of any missing Perl modules
(as logged in $DIR/setup-deps.log).
Please be patient, as this step may take a little while.
EOF
mkdir -p "$DIR/_cpan/CPAN"
echo '1;' >> "$DIR/_cpan/CPAN/MyConfig.pm"
perl -I"$DIR/_cpan" "$DIR/setup-deps.pl" </dev/null >"$DIR/setup-deps.log" 2>&1
rm -rf "$DIR/_cpan"
target=bash_profile
if ! grep "$target" "$HOME/.bashrc" >/dev/null 2>&1
then
if grep 'bashrc' "$HOME/.target" >/dev/null 2>&1
then
target=bashrc
else
echo 'source ~/.bash_profile' >> $HOME/.bashrc
fi
fi
if ! grep "PATH.*edirect" "$HOME/.$target" >/dev/null 2>&1
then
echo "export PATH=\$PATH:$DIR" >> $HOME/.$target
fi
echo ""
echo "ENTREZ DIRECT HAS BEEN SUCCESSFULLY INSTALLED AND CONFIGURED"
echo ""