-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall_alone.sh
64 lines (55 loc) · 1.55 KB
/
install_alone.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
#!/bin/sh
cd $HOME
BASH_RC="$HOME"/.bashrc
BASH_FILE="$HOME"/.profile
BASH_PROFILE="$HOME"/.bash_profile
if [ -f "$BASH_RC" ]; then
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_RC"
printf "\\n"
cat <<EOF >> "$BASH_RC"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOSTPYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.bashrc
elif [ -f "$BASH_FILE" ]; then
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_FILE"
printf "\\n"
cat <<EOF >> "BASH_FILE"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOSTPYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.profile
else
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_PROFILE"
BASHSET="$BASH_PROFIEL"
cat <<EOF >> "$BASH_PROFILE"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOSTPYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.bash_profile
fi
curl -L -o pyfrag.zip https://github.com/TheoChem-VU/PyFrag/zipball/master/
PREZIP="$HOME/pyfrag.zip"
unzip "$PREZIP"
rm -rf $PREZIP
mv "$HOME"/TheoChem-VU-PyFrag*/host $HOME/pyfrag
chmod +x $HOME/pyfrag/bin/*
rm -r "$HOME"/TheoChem-VU-PyFrag*