#!/bin/bash

RELEASE_NAME=v3.0.rc1

UPSTREAM="https://github.com/solvespace/solvespace.git"
git clone --depth=1 --recursive -b ${RELEASE_NAME} ${UPSTREAM}

#rm -rf ./solvespace
#cp -r ./solvespace_copy ./solvespace
#cp -r ./solvespace ./solvespace_copy


rm -rfv solvespace/extlib/freetype
rm -rfv solvespace/extlib/libpng
rm -rfv solvespace/extlib/zlib
rm -rfv solvespace/extlib/si
rm -rfv solvespace/extlib/angle
rm -rfv solvespace/extlib/cairo
rm -rfv solvespace/extlib/flatbuffers
rm -rfv solvespace/extlib/pixman
rm -rfv solvespace/extlib/mimalloc/do*
rm -rfv solvespace/extlib/mimalloc/bin
rm -rfv solvespace/debian
rm -rfv solvespace/.gi*
rm -rfv solvespace/.travis
rm -rfv solvespace/src/fonts/unifont-8.0.01.hex.gz

tar cJf solvespace_${RELEASE_NAME}+repack2.tar.xz solvespace
