Annotation of embedaddon/arping/extra/mktarball, revision 1.1
1.1 ! misho 1: #!/bin/sh
! 2:
! 3: set -e
! 4:
! 5: VERSION="$1"
! 6:
! 7: if [ x"$VERSION" = x"" ]; then
! 8: echo "Usage: $0 <version>"
! 9: echo
! 10: echo " Example: $0 arping-2.11"
! 11: exit 1
! 12: fi
! 13:
! 14: if [ x"$VERSION" = x"latest" ]; then
! 15: VERSION="$(git tag | tail -1)"
! 16: fi
! 17:
! 18: if [ x"$VERSION" = x"HEAD" ]; then
! 19: VERSION="$(git describe)"
! 20: fi
! 21:
! 22: OUTPUT="$VERSION.tar.gz"
! 23: echo "Writing $OUTPUT"
! 24:
! 25: GITDIR="$(realpath .)"
! 26: TMPDIR="$(mktemp -d)"
! 27:
! 28: (
! 29: cd "$TMPDIR"
! 30: mkdir "$VERSION"
! 31: cd "$VERSION"
! 32: git init
! 33: git fetch "$GITDIR"
! 34: git fetch --tags "$GITDIR"
! 35: git checkout "$VERSION"
! 36: rm -fr .git
! 37: autoreconf -i
! 38: cd ..
! 39: tar cfz - "$VERSION" > "$GITDIR/$OUTPUT"
! 40: )
! 41: rm -fr -- "$TMPDIR"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>