-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·46 lines (38 loc) · 1.45 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
#!/bin/bash
#
# INSTALLATION SCRIPT FOR CHITIN BUILDER
#
#-------------------------------------------------------
# SECTION THAT CAN BE MODIFIED
# Directory where VMD startup script is installed, should be in users' paths.
# We use here the default employed by VMD
# Change here if you changed it when installing VMD
install_library_dir="/usr/local/lib/vmd"
#------------------------------------------------------
#
#Installation script please do not modify
#
echo "------------------------------------"
echo "Chitin Builder installation script"
echo "This script requires superuser permission."
echo "Using user:"
echo "$(whoami)"
#[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1;}
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
#Check location of VMD
if [ ! -d "$install_library_dir" ]; then
echo "VMD folder not found, it should be installed in non standard place"
echo "Please modify install_library_dir variable in this script. "
exit 1
fi
echo "VMD found at $install_library_dir"
# Folder for chitin
if [ ! -d "$install_library_dir/plugins/noarch/tcl/chitin1.0" ]; then
echo "Creating Chitin Builder folder"
mkdir $install_library_dir/plugins/noarch/tcl/chitin1.0
fi
#IMPORTANT: The user doing the install must be in the sudoers list
echo "Copying Chitin Builder at vmd folder plugins/noarch/tcl/chitin1.0"
sudo cp -r * $install_library_dir/plugins/noarch/tcl/chitin1.0/
echo "Done!"
echo "Chitin Builder is ready to be used in VMD"