diff options
author | B. Watson <yalhcru@gmail.com> | 2021-12-10 15:40:58 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-14 00:01:11 +0700 |
commit | 130676d5558bbc3a572a7a4aa0cacbffa1ec8c04 (patch) | |
tree | b8321b3e830abf2d663ec5cefa7af50112fbbd7c /network/qtmib/git2tarxz.sh | |
parent | e8bcc6848f3f7bce4bdd8013e2ab258643e06982 (diff) |
network/qtmib: Updated for version 1.1.1+20190827_e62ab95.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/qtmib/git2tarxz.sh')
-rw-r--r-- | network/qtmib/git2tarxz.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/network/qtmib/git2tarxz.sh b/network/qtmib/git2tarxz.sh new file mode 100644 index 000000000000..ad0d4eaa079a --- /dev/null +++ b/network/qtmib/git2tarxz.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Create source tarball from git repo, with generated version +# number. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +# Takes one optional argument, which is the commit or tag to create +# a tarball of. With no arg, HEAD is used. + +PRGNAM=qtmib +CLONE_URL=https://github.com/ac0ra/qtmib + +# Upstream is a fork from this version. They don't use tags... +HARDCODED_VER=1.1.1 + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR --depth 1 + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERSION=1.1.1+${DATE}_${GIT_SHA} + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" |