9a06b02
#!/bin/bash
9a06b02
9a06b02
tag=v1.1.1
9a06b02
9a06b02
set -e
9a06b02
9a06b02
tmp=$(mktemp -d)
9a06b02
9a06b02
trap cleanup EXIT
9a06b02
cleanup() {
9a06b02
    set +e
9a06b02
    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
9a06b02
}
9a06b02
9a06b02
unset CDPATH
9a06b02
pwd=$(pwd)
9a06b02
9a06b02
pushd "$tmp"
9a06b02
git clone https://github.com/mafintosh/tar-stream.git
9a06b02
cd tar-stream
9a06b02
git archive --format=tar tags/${tag} test/ \
9a06b02
    | bzip2 > "$pwd"/nodejs-tar-stream-tests-${tag}.tar.bz2
9a06b02
popd