wayland/make-git-snapshot.sh
Ville Skyttä 2c2b1c5a3b Call ldconfig in libwayland-cursor %post* scripts.
- Run test suite during build.
- Compress snapshot tarballs with xz.
2013-12-21 18:31:15 +02:00

23 lines
592 B
Bash
Executable File

#!/bin/sh
# Usage: ./make-git-snapshot.sh [COMMIT]
#
# to make a snapshot of the given tag/branch. Defaults to HEAD.
# Point env var REF to a local repo to reduce clone time.
DIRNAME=wayland-$( date +%Y%m%d )
REPO=wayland
echo REF ${REF:+--reference $REF}
echo DIRNAME $DIRNAME
echo HEAD ${1:-HEAD}
rm -rf $DIRNAME
git clone ${REF:+--reference $REF} \
git://git.freedesktop.org/git/wayland/${REPO}/ $DIRNAME/${REPO}/
GIT_DIR=$DIRNAME/${REPO}/.git git archive --format=tar --prefix=${REPO}-${DIRNAME#wayland-}/ ${1:-HEAD} \
| xz > ${REPO}-${DIRNAME#wayland-}.tar.xz
# rm -rf $DIRNAME