Skip to content

Instantly share code, notes, and snippets.

@kurtsansom
Forked from dpq/mkh4toh5.sh
Created January 13, 2021 19:30
Show Gist options
  • Save kurtsansom/e89f0314f05bd0459788436cf3195afa to your computer and use it in GitHub Desktop.
Save kurtsansom/e89f0314f05bd0459788436cf3195afa to your computer and use it in GitHub Desktop.
Debian Stretch H4toH5 utility installation
#!/bin/bash
sudo apt -y install checkinstall libhdf4-dev libhdf5-dev
wget https://support.hdfgroup.org/ftp/HDF5/h4toh5/src/h4h5tools-2.2.3.tar.bz2
tar -xf h4h5tools-2.2.3.tar.bz2
cd h4h5tools-2.2.3
for f in $(rgrep -l 'include "hfile.h"' .); do sed -i 's/"hfile.h"/<hfile.h>/' $f; done
for f in $(rgrep -l 'include "mfhdf.h"' .); do sed -i 's/"mfhdf.h"/<mfhdf.h>/' $f; done
for f in $(rgrep -l 'include "hdf.h"' .); do sed -i 's/"hdf.h"/<hdf.h>/' $f; done
CFLAGS='-lmfhdf -ldf -I/usr/include/hdf' ./configure --with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial
make
sudo checkinstall make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment