1#!/bin/bash 2 3VERSION=$(git describe | sed -e "s/^v//") 4echo "echo \"$VERSION\" > .tarball-version" 5echo 'touch --date="$(git log -n 1 --pretty=format:%ci)" .tarball-version' 6echo "git archive --format=tar --prefix=glogg-$VERSION/ v$VERSION >glogg-$VERSION.tmp" 7echo "tar --append -f glogg-$VERSION.tmp --transform s_^_glogg-$VERSION/_ .tarball-version" 8echo "gzip -n < glogg-$VERSION.tmp > glogg-$VERSION.tar.gz" 9echo "rm .tarball-version glogg-$VERSION.tmp" 10 11