Blob Blame Raw
#!/bin/bash

set -e

tmp=$(mktemp -d)

trap cleanup EXIT
cleanup() {
    set +e
    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}

unset CDPATH
pwd=$(pwd)
version=2.6
commit=cb30cbf275e12a8af1d71e42a033af7eb1847bff

pushd "$tmp"
git clone https://github.com/mnemosyne-proj/mnemosyne.git
cd mnemosyne
git archive --prefix="" --format=tar ${commit} {.,mnemosyne,openSM2sync}/LICENSE tests/ | xz -T0 > "$pwd"/Mnemosyne-tests-${version}.tar.xz
popd