#!/bin/sh -x
rm -rf pgroonga
git clone https://github.com/pgroonga/pgroonga.git
( cd pgroonga
  git submodule init
  git submodule update
) || exit $?
date=`date '+%Y%m%d'`
tar cvf - pgroonga | xz -9 >pgroonga-$date.tar.xz
rm -rf pgroonga
