#!/bin/sh

test $# -eq 1 || { echo "Error: Tag required." >&2; exit 1; }

tag=${1}
version=${tag#v}

git archive --format=tar.gz --prefix=qbs-${version}/ -o qbs-${version}.src.tar.gz ${tag}

#!/bin/sh

test $# -eq 2 || { echo "Usage: $(basename $0) <archive format> <tag>" >&2; exit 1; }

format=${1}
tag=${2}
version=${tag#v}

git archive --format=${format} --prefix=qbs-${version}/ -o qbs-${version}.src.${format} ${tag}

Allow to set the archive format in packaging script.
Allow to set the archive format in packaging script.

For Windows, we use zip.

Change-Id: I0e28a284d2be0b071106a3e124fba9c187305887
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>
