#!/bin/sh -x
rm -rf postgresql-datasketches
git clone --depth 1 https://github.com/DataSketches/sketches-postgres.git postgresql-datasketches/
git clone --depth 1 https://github.com/DataSketches/sketches-core-cpp.git postgresql-datasketches/sketches-core-cpp
tar cvf - --exclude .git postgresql-datasketches | xz -9 >postgresql-datasketches-`date '+%Y%m%d'`.tar.xz
rm -rf postgresql-datasketches
