Last active
July 5, 2019 16:13
-
-
Save kparrish/6440812 to your computer and use it in GitHub Desktop.
A bash script to install spglib on a Debian (Ubuntu) machine. To install run the script: sudo bash spglib_install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### spglib Ubuntu install | |
# Assign user name | |
read -p "Enter your user name: " UserName | |
### MAIN ### | |
# Install required packages | |
apt-get update | |
apt-get -y upgrade | |
cd ~/Downloads | |
# Check/remove spglib-1.5.2.tar.gz | |
if [ -f ~/Downloads/spglib-1.5.2.tar.gz ] | |
then | |
rm ~/Downloads/spglib-1.5.2.tar.gz | |
fi | |
# Download spglib-1.5.2.tar.gz | |
sudo -u $UserName wget http://downloads.sourceforge.net/project/spglib/spglib/spglib-1.5/spglib-1.5.2.tar.gz | |
# Extract spglib-1.5.2.tar.gz | |
sudo -u $UserName tar xzf ~/Downloads/spglib-1.5.2.tar.gz | |
# Compile and Install | |
cd spglib-1.5.2 | |
sudo -u $UserName ./configure | |
sudo -u $UserName make | |
cd ~ | |
# Move files | |
mkdir /usr/local/include/spglib | |
cp ~/Downloads/spglib-1.5.2/src/.libs/libsymspg.a /usr/local/lib | |
cp ~/Downloads/spglib-1.5.2/src/*.h /usr/local/include/spglib | |
# Cleanup | |
rm -r ~/Downloads/spglib-1.5.2 ~/Downloads/spglib-1.5.2.tar.gz | |
echo "spglib Install Complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It worked :) thanks!