#!/bin/sh

set -eu -o pipefail

subdir=engine/qclib/
git clone https://github.com/fte-team/fteqw.git fteqcc

VERSION=$(git -C fteqcc log -1 --format=%cd --date=format:%Y%m%d ${subdir})
tar -czf fteqcc_${VERSION}.orig.tar.gz -C fteqcc/${subdir}/ . --transform="s,^,fteqcc-${VERSION}/,"
# rm -rf fteqcc
