Blob Blame History Raw
#!/bin/bash

# This script downloads sources and remove parts licensed under TSL.
#
# As of release 1.2.0, parts of TimescaleDB are licensed under
# Timescale license (TSL). All TSL licensed content is under tsl/
# top-level source directory. This directory has to be removed
# before uploading sources to Fedora.

set -e

NAME="timescaledb"
VERSION=`awk '/^Version:/ { print $2; }' $NAME.spec `

SOURCES_URL="https://github.com/timescale/${NAME}/archive/${VERSION}/${NAME}-${VERSION}.tar.gz"

wget "${SOURCES_URL}"
gunzip "${NAME}-${VERSION}.tar.gz"
tar --delete -f "${NAME}-${VERSION}.tar" "${NAME}-${VERSION}/tsl"
gzip "${NAME}-${VERSION}.tar"