Skip to content

Instantly share code, notes, and snippets.

@joshmoore
Created September 14, 2011 12:31
Show Gist options
  • Save joshmoore/1216437 to your computer and use it in GitHub Desktop.
Save joshmoore/1216437 to your computer and use it in GitHub Desktop.
Simple *nix install script for HDF5 (1.8.7)
set -e
set -u
BASE=hdf5-1.8.7
CURRENT=`pwd`
TARGET=$1
if (test -e $TARGET/bin/h5ls && $TARGET/bin/h5ls --version)
then
echo Using existing HDF install in $TARGET
else
test -e $BASE.tar.bz2 || curl "http://www.hdfgroup.org/ftp/HDF5/$BASE/src/$BASE.tar.bz2" > $BASE.tar.bz2
openssl sha1 $BASE.tar.bz2 | grep -wq 'be1daff26f066aca0b5be52d86dada6757fc4b95' || {
echo "Bad sha1 for $BASE!"
exit -2
}
test -e $BASE || tar xjf $BASE.tar.bz2
cd $BASE
./configure --prefix=$TARGET
make install
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment