#!/bin/bash
tag=0.4.3
commit=75b25bda65fbaefeb78c06d3861972c5af31868f
set -e
tmp=$(mktemp -d)
trap cleanup EXIT
cleanup() {
set +e
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}
unset CDPATH
pwd=$(pwd)
pushd "$tmp"
git clone git://github.com/federomero/negotiator.git
cd negotiator
git archive --prefix="test/" --format=tar ${commit}:test/ \
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
git archive --prefix="examples/" --format=tar ${commit}:examples/ \
| bzip2 > "$pwd"/examples-${tag}.tar.bz2
popd