#! /bin/bash
set -e
tarball="$1"
if [ -z "$tarball" ];  then
  echo "tarball <gap-core.tar.gz>" 1>&2
  exit 1
fi
version="$(echo "$tarball" | sed -e 's/.*gap-\(.*\)-core\.tar.gz$/\1/')"
test -z "$version" && echo "GAP version not found" && exit 1
echo $version
echo $tarball
mk-origtargz --package gap --version "$version" --compression xz --exclude-file 'extern/*' --exclude-file 'hpcgap/extern/*' --exclude-file '.*' "$tarball"
