#!/bin/bash

VERSION=$1

rm -rf intel-gmmlib-*.tar.?z

echo "Downloading intel-gmmlib-$VERSION..."

wget "https://github.com/intel/gmmlib/archive/intel-gmmlib-$VERSION/gmmlib-intel-gmmlib-$VERSION.tar.gz"

tar xf gmmlib-intel-gmmlib-$VERSION.tar.gz

mv gmmlib-intel-gmmlib-$VERSION intel-gmmlib-$VERSION

tar cf intel-gmmlib-$VERSION.tar intel-gmmlib-$VERSION
plzip -9 intel-gmmlib-$VERSION.tar

rm -rf intel-gmmlib-$VERSION gmmlib-intel-gmmlib-$VERSION.tar.?z
