Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
10c5a10f
Commit
10c5a10f
authored
Oct 30, 2014
by
peastman
Browse files
Merge pull request #683 from peastman/master
Checked in install.sh script
parents
476ee9b5
63bccb58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
install.sh
install.sh
+60
-0
No files found.
install.sh
0 → 100755
View file @
10c5a10f
#!/bin/sh
cd
$(
dirname
$0
)
# Ask the user for the install location and Python executable.
defaultInstallDir
=
/usr/local/openmm
printf
"Enter install location (default=
${
defaultInstallDir
}
): "
read
installDir
if
[
-z
${
installDir
}
]
then
installDir
=
${
defaultInstallDir
}
fi
defaultPythonBin
=
$(
which python
)
printf
"Enter path to Python executable"
if
[
${
defaultPythonBin
}
]
then
printf
" (default=
${
defaultPythonBin
}
)"
fi
printf
": "
read
pythonBin
if
[
-z
${
pythonBin
}
]
then
pythonBin
=
${
defaultPythonBin
}
fi
# Make sure it's a supported Python version.
pythonOk
=
$(
${
pythonBin
}
-c
"import sys; v=sys.version_info; print((v[0]==2 and v[1]>5) or v[0]>2)"
)
if
[
${
pythonOk
}
!=
"True"
]
then
echo
"Unsupported Python version. Only versions 2.6 and higher are supported."
exit
fi
# Copy the files into place.
cp
-R
docs
${
installDir
}
cp
-R
include
${
installDir
}
cp
-R
lib
${
installDir
}
cp
-R
licenses
${
installDir
}
# Run the Python installer.
cd
python
export
OPENMM_INCLUDE_PATH
=
${
installDir
}
/include
export
OPENMM_LIB_PATH
=
${
installDir
}
/lib
printenv
if
${
pythonBin
}
setup.py build
&&
${
pythonBin
}
setup.py
install
$@
then
# Print instructions to the user.
echo
echo
"Installation is complete."
else
echo
echo
"INSTALLATION FAILED"
echo
echo
"An error prevented the installation from completing. See above for details."
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment